tecmeister Posted April 27, 2009 Share Posted April 27, 2009 Hi everyone, I have forgot alot of php and I would like help. When you add ?error= to index.php, what is it carried over to that page as? This is what I have typed feedback.php?error=fullname. How to I find out what it has carried over? Thanks for you help, tecmeister. Quote Link to comment https://forums.phpfreaks.com/topic/155890-solved-help/ Share on other sites More sharing options...
premiso Posted April 27, 2009 Share Posted April 27, 2009 When you add ?error= to index.php, what is it carried over to that page as? $_GET['error'] would be the variable that is populated. $error = isset($_GET['error'])?$_GET['error']:false; if ($error !== false) { echo "Your error was {$error}."; } isset to check if that variable exists. The ? and : are ternary operators which act like a shortened if/else statement. Quote Link to comment https://forums.phpfreaks.com/topic/155890-solved-help/#findComment-820559 Share on other sites More sharing options...
tecmeister Posted April 27, 2009 Author Share Posted April 27, 2009 O yeah. I feel like a total numb. Thanks you so much. Quote Link to comment https://forums.phpfreaks.com/topic/155890-solved-help/#findComment-820566 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.