If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.
Post a reply to the thread: How do i redirect error page to index.php if there's an query error?
Click here to log in
What color is our footer?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.
How do i redirect error page to index.php if there's an query error? I have a php page called sample.php that calls query to databse for a few entries.. Ex. sample/apple.html sample/banana.html If someone were to type sample/xxyxz.html it produces an error even though i have 401 redirect because $row = mysql_fetch_array($result) or die(mysql_error()); so how do i set it so if the php can't fetch the array, it goes to index.php instead? the thing is 401 redirect only works when it's not query-related. as in example.com/xxxxxyyfad will redirect to example.com but if someone types example.com/sample/xdfds.html, it gets an error because of the query.
How do i redirect error page to index.php if there's an query error?
Forum Rules