acctman Posted January 20, 2009 Share Posted January 20, 2009 user clicks domain.com/gender.html?s=1 or domain.com/gender.html?s=2 then they're taken to regpage.php on that page I want to echo the text Female if s=1 and Male is s=2 Link to comment https://forums.phpfreaks.com/topic/141551-solved-need-help-with-url-get-string/ Share on other sites More sharing options...
haku Posted January 20, 2009 Share Posted January 20, 2009 You have gender.html with URL variables. Is your server set to process .html files as .php? I'm guessing that in gender.html, you want to have two links, one for male, one for female. Is that right? If so, make the links like this: <a href="regpage.php?s=1">Click here if you are female</a> <a href="regpage.php?s=2">Click here if you are male</a> Then on regpage, you put this: echo ($_GET['s'] == 1) ? 'Female' : 'Male'; Link to comment https://forums.phpfreaks.com/topic/141551-solved-need-help-with-url-get-string/#findComment-740925 Share on other sites More sharing options...
acctman Posted January 20, 2009 Author Share Posted January 20, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/141551-solved-need-help-with-url-get-string/#findComment-740944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.