here is the code that accesses the db table where the records are kept:
session_start(); // Turn on the session variables
ini_set('display_errors', true); // I want PHP Information On Screen
error_reporting( E_ALL ); // I want as much Debug Info I can get when I code
include ('db_conn.php');
$db = mysql_connect($servhost, $servuser, $servpwd);
if ( !$db ){
exit( "Connection Failed" );
}
$dbn = ($dbsname);
if(!mysql_select_db($dbn, $db) ){
exit( "DB Selection Failed" );
}
// see if SESSION have some such value, otherwise = '' = empty
$recnum_id2 = isset($_GET['recnum']) ? $_GET['recnum'] : '';
if( !empty($recnum_id2) ){
$sql = "SELECT * FROM $tabname WHERE recnum = '$recnum_id2'";
}
else{
}
// do the sql query and get result
$srchdn2 = mysql_query($sql);
// ARRAY to store the rows, if any
$all_rows = array(); // make an empty array
while($row = mysql_fetch_assoc($srchdn2)){
$all_rows[] = $row; // store each row, if any
}