jimgordon
asked on
Undefined index
I get this error when I open the page where you can choose a city to post an ad. Error seems to be in the second line of the code:
$targetview = $_GET['targetview'];
$citylink_view = "view=$targetview&postevent=$_GET[postevent]";
//$citylink_view = "view=selectcity&targetview=$targetview";
if($location_sort)
{
$sort1 = "ORDER BY countryname";
$sort2 = "ORDER BY cityname";
}
else
{
$sort1 = "ORDER BY c.pos";
$sort2 = "ORDER BY ct.pos";
}
Yes
in you previous statement you forgot the single quote around the postevent
$citylink_view = "view=$targetview&posteven t=$_GET['p ostevent'] ";
in you previous statement you forgot the single quote around the postevent
$citylink_view = "view=$targetview&posteven
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
$postevent = isset($_GET['postevent']);
$targetview = $_GET['targetview'];
$citylink_view = "view=$targetview&posteven
and it works now. It is correct?