Halyard Posted October 7, 2008 Share Posted October 7, 2008 OK I am playing around with some very basic PHP, and have come across something that I just can't figure out; the code is as follows:- The HTML <form action="welcome7.php" method="post"> <label>First Name <input type="text" name="firstname" /> </label><br /> <label>Last Name <input type="text" name="lastname" /> </label><br /> <input type="submit" value="Go!" /> </form> The PHP <?php $firstname = $_REQUEST['firstname']; $lastname = $_REQUEST['lastname']; if ($firstname == 'Alf' and $lastname == 'Idiot') { echo 'Welcome, oh glorious leader!'; } else { echo "Welcome to our Web site, $firstname $lastname!"; } ?> Now in theory the URL showing int the address bar of Firefox should be "http://localhost/php/welcome7.php", at least that is what I would be expecting to appear, however what actually appears is "http://localhost/php/welcome5.php"! Is there something that I am just not seeing? (edited by kenrbnsn to add tags) Link to comment https://forums.phpfreaks.com/topic/127373-probably-a-stupid-question/ Share on other sites More sharing options...
waynew Posted October 7, 2008 Share Posted October 7, 2008 You're after placing a file somewhere you shouldn't have. Take a look through your file system and see if you saved a file in the wrong folder or something. Link to comment https://forums.phpfreaks.com/topic/127373-probably-a-stupid-question/#findComment-658914 Share on other sites More sharing options...
Halyard Posted October 7, 2008 Author Share Posted October 7, 2008 You're after placing a file somewhere you shouldn't have. Take a look through your file system and see if you saved a file in the wrong folder or something. That was the first thing I thought of waynewex - both of the relevant files are sitting one above the other in the correct folder - it sort of freaks me when things just don't do what they are supposed to for no apparent reason... Had I made a simple and obvious mistake it wouldn't be so bad! Link to comment https://forums.phpfreaks.com/topic/127373-probably-a-stupid-question/#findComment-658982 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.