Question about 'isset'
Posted: Thu Jun 09, 2005 10:39 pm
I am working on a little project and understand that my problem could potentially be solved using 'isset'. However, I do not know how to use it properly, so I would greatly appreciate if someone could tell me what to write instead.
Okay, I am getting an error saying 'undefined index on line 7'. How can I rewrite this to work? I appreciate the help!
Okay, I am getting an error saying 'undefined index on line 7'. How can I rewrite this to work? I appreciate the help!
Code: Select all
<? IF($_SERVER['QUERY_STRING'] != "" AND $_SERVER['QUERY_STRING'] != "view=advanced") {
$body = "
<h3>There was an error in loading this page because a link was not clicked to access it.</h3>
<br>
<h5><a href='search.php'>Click here to access the search page</a>.</h5>
";
}ELSEIF($_GET["view"] == "" OR $_SERVER['QUERY_STRING'] = ""){
$advancedsearch_link = "
<p><a href='search.php?view=advanced'>Advanced Search</a></p>
";
$body = "
<form method='GET' action='results.php'>
<input type='text' tabindex='1' name='query' size='25' maxlength='50' onfocus=\"if(this.value == this.defaultValue){this.value = ''}\" value='Enter keywords here' />
<input type='submit' value='Search' name='search_submit' tabindex='2'>
$advancedsearch_link
</form>
";
}