condor Posted June 4, 2009 Share Posted June 4, 2009 Hi, The IF statement below redirects the user to next.php if "entry" is not in my database. I thought I'd try the GET method to define "entry" once the user is on next.php. However, I get a 404 error. Am I missing something? Thanks $anymatches=mysql_num_rows($result); if ($anymatches == 0) { $_GET['entry'] = (isset($_POST['entry'])) ? $_POST['entry'] : $_GET['entry']; $_GET['entry'] = strtolower($_GET['entry']); header("Location:next.php&entry={$_GET['entry']}"); exit; } Link to comment https://forums.phpfreaks.com/topic/160990-get-method/ Share on other sites More sharing options...
RClapham Posted June 4, 2009 Share Posted June 4, 2009 404 Error is the web server telling you that the file doesn't exist. It's nothing to do with the GET method in this case it's just that you're pointing to a file on the server that isn't there. Check to make sure that file paths are correct and definitely pointing to the next.php file. Link to comment https://forums.phpfreaks.com/topic/160990-get-method/#findComment-849622 Share on other sites More sharing options...
condor Posted June 4, 2009 Author Share Posted June 4, 2009 Hmmm. Next.php is definitely there. Link to comment https://forums.phpfreaks.com/topic/160990-get-method/#findComment-849633 Share on other sites More sharing options...
ldougherty Posted June 4, 2009 Share Posted June 4, 2009 The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server but the server could not find what was requested. What does the URL in your navigation bar actually say? Link to comment https://forums.phpfreaks.com/topic/160990-get-method/#findComment-849636 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.