osyrys14 Posted May 17, 2011 Share Posted May 17, 2011 Can anyone take a quick look at this and tell me what I'm missing... I've looked at it so much I'm lost. (i'm not new, just stared too long and can't get my eyes to focus anymore on what I'm missing. <?php $varname = $_POST['formname']; $varaddress = $_POST['formaddress']; $varemail = $_POST['formemail']; $varphone = $_POST['formphone']; $varbustype = $_POST['formtype']; $varmethod = $_POST['formmethod']; $db = mysql_connect("localhost","private","private"); if(!$db) die("Error connecting to MySQL database AGAIN..."); mysql_select_db("table" ,$db); $sql = "INSERT INTO mailing_list ( listname, listaddress, listemail, listphone, listmethod ) VALUES ( '$varname', '$varaddress', '$varemail', '$varphone', '$varbustype', '$varmethod' )" ; mysql_query($sql); ?> The page processes properly without error, but nothing shows in the database... Thanks in advance to any help. Osyrys Link to comment https://forums.phpfreaks.com/topic/236613-no-error-not-entry-in-db/ Share on other sites More sharing options...
phppaper Posted May 17, 2011 Share Posted May 17, 2011 five fields with inserting 6 values Link to comment https://forums.phpfreaks.com/topic/236613-no-error-not-entry-in-db/#findComment-1216388 Share on other sites More sharing options...
VZdemon Posted May 17, 2011 Share Posted May 17, 2011 just for personal note, try making a connect.php page with the mysql connection functions on it and include it in every page it saves alot of time. Link to comment https://forums.phpfreaks.com/topic/236613-no-error-not-entry-in-db/#findComment-1216580 Share on other sites More sharing options...
grahamb314 Posted May 17, 2011 Share Posted May 17, 2011 What phppaper said Link to comment https://forums.phpfreaks.com/topic/236613-no-error-not-entry-in-db/#findComment-1216678 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.