Lambneck Posted August 26, 2008 Share Posted August 26, 2008 See whats wrong: mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($database); if (isset($_POST['Submit'])) { $country = $_POST['country']; $cn = $_POST['company_name']; $ca = $_POST['company_address']; $bn = $_POST['billing_name']; $ba = $_POST['billing_address']; $phn = $_POST['phone_number']; $email = $_POST['email']; $cn = $_POST['card_number']; $card1 = $_POST['mastercard']; $card2 = $_POST['visa']; $ce = $_POST['card_expiration']; $si = $_POST['special_instructions']; $subject = $_POST['subject']; $message = $_POST['message']; $submission_date = date("l M dS, Y, H:i:s"); $ip = getenv ('REMOTE_ADDR'); mysql_query("INSERT INTO $table (col_2, col_3, col_4, col_5, col_6, col_7, col_8, col_9, col_10, col_11, col_12, col_13, col_14, col_15, submission_date, ip_address) VALUES ('country', '$cn', '$ca', '$bn', '$ba','$phn','$email','$cn','$card1','$card2','$ce','$si','$subject','$message', '$submission_date','$ip')")or die(mysql_error()); echo '<table id=table1><tr><td><b>Thank you, your information was was submitted.</b></td></tr>'; form doesn't send collected info to database. any suggestions? Link to comment https://forums.phpfreaks.com/topic/121432-solved-form-gtdatabase/ Share on other sites More sharing options...
Jabop Posted August 26, 2008 Share Posted August 26, 2008 An error message would help Link to comment https://forums.phpfreaks.com/topic/121432-solved-form-gtdatabase/#findComment-626203 Share on other sites More sharing options...
liamthebof Posted August 26, 2008 Share Posted August 26, 2008 $cn is using card_number and company name which does not look right. Link to comment https://forums.phpfreaks.com/topic/121432-solved-form-gtdatabase/#findComment-626206 Share on other sites More sharing options...
mrMarcus Posted August 26, 2008 Share Posted August 26, 2008 $table isn't defined. Link to comment https://forums.phpfreaks.com/topic/121432-solved-form-gtdatabase/#findComment-626262 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.