Cannot Post Info To A MySQL DB

admin

Administrator
Staff member
Here is the code that will not work. I want it to take the data from appendex.html and write it to a MySQL DB. Thanks for your help!

<?php

$host = "db.syzme.******.com";
$user = "******";
$password = "******";
$db_name = "syzme";
$table_name = "atlantis";

$file_pointer = fopen ("appendex.html", "r");
$t = file ("appendex.html");

$link = mysql_connect ($host, $user, $password);

$query = "INSERT into $table_name values ("0", $t)";

print "Query: $Query";

if (mysql_db_query ($db_name, $query, $link)) {
print "IT WORKED!!!! HA HA IT WORKED!!!<BR>";
} else {
print "YOU SUCK! IT DIDNT WORK!";
}
mysql_close ($link);
?>
 
Back
Top