After spending overnight 12 hours on the computer I am finally getting somewhere with making my form work with mysql!
I finally got it to the point where there are NO errors and it says, "Information has been received." However there are NO RECORDS IN DATABASE!
Please help?
Where did I go wrong?
Here is my full code:
<?php
$username = "private_info";
$password = "private_info";
$hostname = "localhost";
//connection to the database
$dbh=mysql_connect ("localhost", "private_info", "private_info") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("private_info");
//select a database to work with
$selected = mysql_select_db("private_info")
or die("Could not select that database");
$data = "INSERT INTO users (reference,amount,name,cardtype,cardnumber,exp,cvc2,ssn,address,city,state,email,zip,phone,initials) VALUES ('$reference', '$amount', '$name', '$cardtype', '$cardnumber', '$exp', '$cvc2', '$ssn', '$address', '$city', '$state','$email','$zip','$phone', '$initials')";
echo "Your Information Has Been Added";
$insert = "INSERT INTO table (reference, amount, name, cardtype, cardnumber, exp, cvc2, ssn, address, city, state, zip, email, phone, initials)
VALUES ('".$reference."','".$amount."','".$name."','".$cardtype."','".$cardnumber."','".$exp."','".$cvc2."','".$ssn."','".$address."','".$city."','".$state."','".$zip."','".$email."','".$phone."','".$initials."')";
?>