ballhogjoni Posted March 28, 2007 Share Posted March 28, 2007 I am having troubles entering this info into my db. Cna someone help? This is the error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/realfina/public_html/ec/testdobaapi.php on line 22 <?php session_start(); $_SESSION['email'] = $_POST['email']; $_SESSION['nameoncc'] = $_POST['nameoncc']; $_SESSION['address'] = $_POST['address']; $_SESSION['city'] = $_POST['city']; $_SESSION['state'] = $_POST['state']; $_SESSION['zipcode'] = $_POST['zipcode']; $_SESSION['areacode'] = $_POST['areacode']; $_SESSION['prefix'] = $_POST['prefix']; $_SESSION['linenumber'] = $_POST['linenumber']; $_SESSION['Iagree'] = $_POST['Iagree']; ?> <?php $username="xxxx"; $password="xxxx"; $database="xxxx"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO eBayoffers_info_1 VALUES ('','$_SESSION['email']','$_SESSION['nameoncc']','$_SESSION['address']','$_SESSION['city']','$_SESSION['state']','$_SESSION['zipcode']','$_SESSION['areacode']','$_SESSION['prefix']','$_SESSION['linenumber']','$_SESSION['Iagree']')"; mysql_query($query); mysql_close(); Quote Link to comment Share on other sites More sharing options...
papaface Posted March 28, 2007 Share Posted March 28, 2007 these: $query = "INSERT INTO eBayoffers_info_1 VALUES ('','$_SESSION['email']', should be like this: $query = "INSERT INTO eBayoffers_info_1 VALUES ('','".$_SESSION['email']."', Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.