Hi,
The following is the error I'm getting
Notice: Undefined index: action in C:\bookstore\book_list.php on line 28
the code in red is generating error
book_list.php displays a list of books based on the users search criteria on index.php
A portion of index.php code
<table align=left width=30% height=20% border=0 cellpadding=3 cellspacing=10> <!--2a-->
<!-- bgcolor= "#c0c0c0" -->
<TR>
<td align="left" width=50px>
<form name="frm" action="book_list.php" method=POST onSubmit="return validate_criteria(this)">
<b>SEARCH</b> <br><select name="search_by">
<option value="ISBN">ISBN</option>
<option value="Title">Title</option>
<option value="Author">Author</option>
<option value="Publisher">Publisher</option>
<option value="Subject" >Subject</option>
</select><br><br>
<input type="text" name="criteria" size=10>
<input type=SUBMIT value="OK">
</form>
<font><a href="book_list.php">Browse By Subject</a></td>
</TR>
<tr><td><br><br></td></tr>
<tr><td><img src="stacked_books.gif" height="80"></td></tr>
</table><!--2a-->
book_list.php code
<table>
<?php
// This page will list all of the items
// from the items table. Each item will have
// a link to add it to the cart
include("search.html");
include("db.php");
// Get a connection to the database
//$cxn = @ConnectToDb($dbServer, $dbUser, $dbPass, $dbName);
$cxn = @ConnectToDb($server, $user, $pass, $database);
//phpinfo();
//set_magic_quotes_runtime(1);
switch [COLOR="Red"]($_POST['action'])[/COLOR]{
default:
{create_select();
$_SESSION[criteria]=FALSE;
break;}
case "sel_subject":
{create_select_subject($_GET['subject']);
$_SESSION[criteria]=FALSE;
break;}
}
Can someone help me?