Undefined index means that your query string doesnt have ac=something
Undefined constant means that you didnt enclose the associative index in quotes, i.e. you treated it as a constant rather than as a string.
Changing to use $_REQUEST wont help, in this case, assuming you do indeed want to use incoming variables from the query string.
Rather you could use something along the lines of:
if (isset($_GET['ac'])) {
if ($_GET['ac'] == '1') {
print "You've chosen the option #1";
}
elseif ($_GET['ac'] == '2') {
print "You've chosen the option #2";
}
else {
print "You've chosen an invalid option";
}
}
else {
print "No option has been chosen";
}
you might also use ![man]empty/man instead of [man]isset/man