php-db | 2001072
Date: 07/18/01
- Next message: Jeff Oien: "[PHP-DB] MySQL Timestamp"
- Previous message: Jeff Oien: "[PHP-DB] Only Insert on Error?"
- In reply to: Jeff Oien: "[PHP-DB] Only Insert on Error?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try using ' instead of \" like:
if ($M_First_Name) {
$sql = "INSERT INTO $table_name
(First_Name, Last_Name, Family_Position, Address, Address1, City, State,
Zip, Email,
Home_Phone, Work_Phone, Coop_Month, Timestamp) VALUES
('$M_First_Name', '$M_Last_Name', '$MatherFamilyPosition','$M_Address1',
'$M_Address2', '$M_City', '$M_State', '$M_Zip', '$M_Email', '$M_H_Phone',
'$M_W_Phone', '$coopmonth', 'NOW()')";
if(! $result = mysql_query($sql,$connection)) {
print("ERROR ".mysql_errno().": ".mysql_error()."<br>\n$sql<br>\n");
}
}
------------------------
if ($M_First_Name) {
$sql = "INSERT INTO $table_name
(First_Name, Last_Name, Family_Position, Address, Address1, City, State,
Zip, Email,
Home_Phone, Work_Phone, Coop_Month, Timestamp) VALUES
('$M_First_Name', '$M_Last_Name', '$MatherFamilyPosition','$M_Address1',
'$M_Address2', '$M_City', '$M_State', '$M_Zip', '$M_Email', '$M_H_Phone',
'$M_W_Phone', '$coopmonth', 'NOW()')";
// if(! $result = mysql_query($sql,$connection)) {
// print("ERROR ".mysql_errno().": ".mysql_error()."<br>\n$sql<br>\n");
// }
}
Hope it works,
Cami
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff Oien: "[PHP-DB] MySQL Timestamp"
- Previous message: Jeff Oien: "[PHP-DB] Only Insert on Error?"
- In reply to: Jeff Oien: "[PHP-DB] Only Insert on Error?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

