I can not get this to do anything. This is called from the submit form page. This page is brought up in the browser, but I get nothing else. no data is entered into the database, and I get no errors.
I am trying this on my home computer running WinXP, IIS
The html portion of the code (not included) confirms the insertion, but like I say, I get a blank page.
Any Ideas at all?
<?
session_start();
if ($_SESSION[valid] != "yes") {
header("Locationhttp://localhost/test/member_menu.php");
exit;
}
$db_name = "members";
$table_name = "chamber_members";
$connection = mysql_connect("localhost", "username", "password") or die(mysql_error());
$db = mysql_select_db($db_name, $connection) or die(mysql_error());
$sql = "INSERT INTO $table_name (id, f_name, l_name, b_name, mail_address, bus_address, city, state, zip, bus_type, web_address) VALUES (' ', '$POST[f_name]', '$POST[l_name]', '$POST[b_name]', '$POST[mail_address]', '$POST[bus_address]', '$POST[city]', '$POST[state]', '$POST[zip]', '$POST[bus_type]', '$POST[web_address]')";
$result = mysql_query($sql, $connection) or die(mysql_error());
?>
I should say that this works if I put the actual data in instead of using the variable "$_Post[]"