Passing a parameter to a WordPress page
-
Hiya,
Newbie here, I have a newsletter registration page which needs to show the right message depending upon parameters called.
i.e.
https://www.mydomain/wp/newsletter/?error=0
CASE 1:
Success for registering!https://www.mydomain/wp/newsletter/?error=1
CASE 2:
We couldn’t register you.The newsletter page (a “Page” with custom PHP template) does not recognise the parameters.
Test code in the template is
<? if ($_GET[‘error’]==1) {
echo ‘ERROR TRUE’;
} else {
echo ‘ERROR FALSE’;
} ?>and ‘ERROR FALSE’ always shows.
Am I doing something dumb? Any ideas?
TIA.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Passing a parameter to a WordPress page’ is closed to new replies.