$sql = "INSERT INTO user_saving_plans (user_id, catergory_id, product_id, savings_amount, company) VALUES (' . $_SESSION['user_id'] . ', '1', ' . $row['product_id'] . ', ' . $saving . ', ' . $row['company'] . ')";
$retval = mysql_query( $sql, $connection );
if(! $retval ){
die('Could not enter data: ' . mysql_error());
}
echo "Entered data successfully\n";
Trying to a string to insert a row into a table. Keep getting syntax errors.
Current error is:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING