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. 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. 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. Link to comment https://forums.phpfreaks.com/topic/155890-solved-help/#findComment-820566 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.