hi how to get the value of showpage in the url,(http://mysitec.com/default.php?showpage=/home.asp&id=2)
please help
$somevar=$_GET['showpage'];
This is like, #1 or #2 on the F.A.Q. here in the Newbies forum...
I gor this error Notice: Undefined index: showpage when
well, when you enter that page without the query string containing anything, $_GET['showpage'] is undefined.
You could alter the error messages level so that notices arent shown, or better still, use isset() or empty() to check first.
hi sorry i meant
http://mysitec.com/default.ph ?showpage=home.asp&id=2
i need to get this (id) value from the url ie 2
Then use $_GET['id'] I suggest that you read the PHP manual on predefined variables.