Alright my problem is I after submiting a form my page goes blank and the data isnt saved to the mysql database here is my code.
[code] <?php
if(isset($_POST[‘Submit’]))
{
$db_host=‘localhost’;
$db_user=’******_frazier’;
$db_pass=’******’;
$db_name=******_fraziercompanies;
$db = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_name,$db);
$sql = “INSERT INTO $db_table(CompanyID,CompanyName,CompanyContact,CompanyPhone,CompanyDinner,CompanyAddress,CompanyCity,CompanyState,CompanyZIP,CompanyEmail,CompanyPlayers,CompanyPlayer1,CompanyPlayer1HC,CompanyPlayer2,CompanyPlayer2HC,CompanyPlayer3,CompanyPlayer3HC,CompanyPlayer4,CompanyPlayer4HC)
VALUES
(’$_POST[Company_Name]’,’$_POST[Company_Contact]’,’$_POST[Company_Address]’,’$_POST[Company_City]’,’$_POST[Company_State]’,’$_POST[Company_ZIP]’,’$_POST[Company_BusPhone]’,’$_POST[Company_AltPhone]’,’$_POST[Company_MobPhone]’,’$_POST[Company_NumPlayers]’,’$_POST[Player_Name1]’,’$_POST[Player_Handicap1]’,’$_POST[Player_Name2]’,’$_POST[Player_Handicap2]’,’$_POST[Player_Name3]’,’$_POST[Player_Handicap3]’,’$_POST[Player_Name4]’,’$_POST[Player_Handicap4]’)”;
mysql_query($sql);
}
else
{
?>
<form name="form1" id="form1" method="post">
<span class="left">
<label style="vertical-align: middle">Company Name:
<input name="Company_Name" type="text" style="vertical-align: middle" value="" size="20" />
<br />
</label>
<label> Company Contact:
<input name="Company_Contact" type="text"style="vertical-align: middle" size="20"/>
</label>
<br />
<label style="vertical-align: middle">Company Address:
<input type="text" name="Company_Address" style="vertical-align: middle"/>
Company City:
Company State:
Company ZIP:
Company Business Phone:
Company Alternate Phone:
Company Mobile Phone:
Number of Players:
Dinner:
<label style="vertical-align: middle"></label>
</span>
<span class="center">
<label style="vertical-align: middle">Payment Method:
<input type="text" name="Company_Payment" style="vertical-align: middle"/>
<br />
Credit Card Type:
<input type="text" name="Company_CardType" style="vertical-align: middle"/>
<br />
Credit Card Number:
Player Name:
Player Handicap:
Player Name:
Player Handicap:
Player Name:
Player Handicap:
Player Name:
Player Handicap:
<?php
}
?>
[/code]
MOD EDIT: Added code tags