Avoid using isset in PHP when accessing $_POST, $_GET, and other variables?

shellx

New Member
how can I prevent PHP from returning an Undefined variable error every time I try to check a variable if it has contents and that certain variable hasn't been used yet? In my previous setup, I can check $_POST['email'] even if I haven't put anything into it yet. It simply returns a blank or empty result. That's how I want my PHP setup to work but for the life of me, I can't seem to find figure out how to configure it. :(Example:\[code\]<?phpif ($_POST['info'] != '') { // do some stuff}?><form method="post"><input type="text" name="info" /><input type="submit" /></form>\[/code\]When you use the above script in a single PHP page and run it on my current setup, it returns an Undefined variable error. On my previous setup, that script worked like a charm. Can anyone share some light into this problem of mine. If you need further details, just say so and I will try to add more details to this post.I know about the isset() checking but I don't want to use it on all of my scripts. I want it to not be that restrictive about variables.
 
Back
Top