hi guys,
Im revisiting php for my final year project and Im forgetting or not realising silly things.
I have a collapsable / expandable list which is controlled by a variable in the query string of the URL telling the page what to keep open.
When i load the page initially I don't want to have to specify a value for the variable in the URL ie nothing is selected so why bother?
I have the following code at the top of the page:
$selected = $_REQUEST['listSel'];
if ($selected == "") {
$selected = "none";
}
it works when I have a value in the URL but not when there isnt. it causes an error. What do I need to do? I know in ASP it doesnt matter if the listSel variable isnt there in the query string.
Thanks for you help in advance.
cheers,
beN