Jump to content

Insert Problem mysql


todayme

Recommended Posts

Can someone tell me what I am doing wrong, I am geting no errors but it is not inserting the data, I have tried the variables as they are and like this '$variable' but neither seems to work.

 

<? 
//set the variables as required
$dbhost = "localhost"; 
$dbuser = "admin_sex"; 
$dbpass = "sex"; 
$dbname = "admin_sex"; 

session_start();



echo $_SESSION['accountsession']; 

$dbDate = date("d.m.y");
$dbState = $_POST['State'];
$dbIndustry = $_POST['Industry'];
$dbLocation = $_POST['Location'];
$dbContact = $_POST['Contact'];
$dbStreet = $_POST['Street'];
$dbPostCode = $_POST['PostCode'];
$dbPhPrefix = $_POST['PhPrefix'];
$dbPhone = $_POST['Phone'];
$dbMobile = $_POST['Email'];
$dbDescription = $_POST['Description'];
$dbErgancy = $_POST['R1'];
$dbComType = $_POST['R2'];
$dbLinkID = $_POST[LinkID];





$db = mysql_pconnect($dbhost,$dbuser,$dbpass); 
mysql_select_db($dbname) or die(mysql_error());


$sql="INSERT INTO _Leads (LINKID, Industry, Location, State, Date, Contact, Street, PostCode, PhPrefix, Phone, Mobile, Description, Ergancey, ComType)
VALUES
($dbLinkID,$dbIndustry,$dbLocation,$dbState,$dbDate,$dbContact,$dbStreet,$dbPostCode,$dbPhPrefix,$dbPhone,$dbMobile,$dbDescription,$dbErgancey,$dbComType)";

mysql_close($db);

?>



Link to comment
https://forums.phpfreaks.com/topic/41430-insert-problem-mysql/
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.