Jump to content

[SOLVED] form->database


Lambneck

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.