I defer to your knowledge of variables, and thank you for your answer. Unfortunately, that rules out what I thought was the cause of my problem.
Can you tell me why I'm get this error when I try to close the connection:
Warning: mysql_close() expects parameter 1 to be resource, null given in /Users/peterv/Sites/LP2/books_form1.php on line 7
This is the beginning of the books_form1.php mentioned in the error message:
<?php
//mybooks_form.php - Updated: Tuesday January 4, 2011 - 2:53 PM
if(isset($_POST['formoption']))
{
include('./INCLUDES/process_switch.php');
mysql_close($link);
if ($formoption == "List") { // Prevents redisplaying form for list opt.
exit;
}
}
?>
What this should be doing is when the form is processed, calling the process_switch, which has a call to dbconnect.php. If I understand you correctly, shouldn't the mysql_close function work without error because the $link variable in the include file would be global? I appreciate your assistance with this.