Can't get data into MySQL DB

admin

Administrator
Staff member
Could someone please tell me why my database isn't recieving the new data. I've included the code I'm using.

<?
// Connect to server
$mysql_link = mysql_connect("HOST", "USERNAME", "PASSWORD");

// select the 'DATABASE' database
mysql_select_db("DATABASE", $mysql_link);

// insert a row
$query = "INSERT INTO TABLE (Company, Address1, Address2, County, City, State, ZipCode, Contact1Phone, Contact1, Contact2Phone, Contact2) ";

$query .= "VALUES('$Company', '$Address1', '$Address2', '$County', '$City', '$State', '$ZipCode', '$Contact1Phone', '$Contact1', '$Contact2Phone', '$Contact2') ";


$mysql_result = mysql_query($query, $mysql_link);

// Print("Thanks $Company.<BR>\n");
// print("<BR>\n");
// print("<BR>\n");
// print("<BR>\n");
// print("$Company<BR>\n");
// print("$Address1<BR>\n");
// print("$Address2<BR>\n");
// print("$City, $State $ZipCode<BR>\n");
// print("Phone: ($PriPhoneAC)$PriPhonePRE - $PriPhoneSUF<BR>\n");

mysql_close($mysql_link);

?>
 
Back
Top