Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Can't get empty $ GET


cffrost2 - 4:16 am on Aug 24, 2012 (gmt 0)


You didn't properly close your if statement befor you started the code block.
if (empty ($e) {

Should be
if (empty ($e)) {
I use a little different approach.

Try this.
if(isset($_GET['e']) and $_GET['e'] != '')
{ $e = $_GET['e']; }
else
{ $e = 'e is empty'; }
echo $e;


Here you are checking that the e var is set and that it doesn't equal nothing.

Hope this helps. There are a lot of different ways to do what you're wanting. This is just one easy way.


Thread source:: http://www.webmasterworld.com/php/4487813.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com