Inserting records question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Still learning, so sorry if this sounds really simply noobish.  But as I 
understand things currently this should work.  But doesn't.  I've been 
looking over tutorials but just don't see whatever the problem is.

I created a simple table with the following fields (in order)
tc_id (auto nmbr)
lname
fname
machine_name
email_addr
problem
date_time_submitted (timestamp)

And I'm trying to run this insert from form input.  

		$username="somename";
		$password="somepass";
		$database="somedb";
		$table="sometable";
		mysql_connect(localhost,$username,$password);
		@mysql_select_db("$database") or die("Unable to Connect to DB");
		$tc_query = "INSERT INTO $tablel VALUES(NULL, $lname, $fname, $machine_name, 
$email_addr, $problem, NULL)";
		$result = mysql_query($tc_query);
		mysql_close();

So what exactly do I seem to be missing here?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux