Inserting problem
Posted: Mon Jul 22, 2002 12:14 pm
I am wanting to insert data from users to a mySQL database. When I run the code I don't get any errors messages.....but when the result is tested it is false. I can run the query that is generated in phpMyAdmin 2.2.5 and it works perfectly. Any ideas?
Code: Select all
$conn = db_connect();
if(!$conn)
die("Error: could not connect to database. Please try again later.");
mysql_select_db("lufkinorg");
$query = "insert into contributors values ("02G9100261", "Matt", "Phillips".
"", "1026 Hyde Rd", "Huntington", "TX", "75949", "936.422.4241", "mphillips@lufkin.org")";
$result = mysql_query($query, $conn);
if ($results)
echo mysql_affected_rows()."entered";
else
echo "no result";