Jump to content

[SOLVED] Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STR


ballhogjoni

Recommended Posts

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();

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.