Hi;
I use the $_GET to get the values of variables attached to url like this:
http://www.abc.com/mypage.php?var1=abc
in the mypage.php, I use $var1=$_GET['var1'];
But it will give an error message when there is no variable attached to the url like:
http://www.abc.com/mypage.php
the message is
Notice: Undefined index: var1 in ... www\mypage.php on line 2
I want the mypage.php to be able to handle both cases smoothly.
How can I do that?
Your help is highly appreciated.
Peter
I use the $_GET to get the values of variables attached to url like this:
http://www.abc.com/mypage.php?var1=abc
in the mypage.php, I use $var1=$_GET['var1'];
But it will give an error message when there is no variable attached to the url like:
http://www.abc.com/mypage.php
the message is
Notice: Undefined index: var1 in ... www\mypage.php on line 2
I want the mypage.php to be able to handle both cases smoothly.
How can I do that?
Your help is highly appreciated.
Peter