Ploblems inserting into a table, and I dont know why.

From: Date: Mon, 09 Oct 2000 08:02:07 +0000
Subject: Ploblems inserting into a table, and I dont know why.
Groups: php.general 
Request: Send a blank email to php-general+get-19144@lists.php.net to get a copy of this message
I have connected to mysql, I have created the DB, I have created the Table, I have made the database the active database, And I still cant freaken do it,..... here is my code. Please pardon the sloppy code, and forgive me any infringements on the rules, this is my first post, Thanks in advance. <HTML> <body> <? require("connect.phtml"); $debug=1; if ($debug) { echo (" Name = $applicant <BR> Email = $email<BR> email var = $email_var<BR> <BR> Company = $company_name<BR> address = $address<BR> city = $city<BR> "); //does the email match? if ($email == $email_var) echo"the email addresses match"; else echo"the email addresses do not match"; } //$res = mysql_select_db("mail_list"); if(!mysql_select_db(mail_list)) {echo"<BR>database not selected<BR>"; exit(); } else { echo "<BR>database selected<BR>"; } $add = "INSERT into list VALUES ($applicant, $email, $company_name, $address, $city)"; if(!mysql_query($add)) { echo" unable to insert into DB"; } else { echo"insert complete"; } ?> </body> </HTML>

« previous php.general (#19144) next »