You have put ' ' around all the other vars in the values section but not the $dis
try this
$write_statement = "INSERT INTO cartdata (cid, cdesc, csize, cres, cprice, cust)
VALUES($cartidnum, '$cartdesc', '$size_var', '$res_var', '$price_var', '$dis')";
[]/php]
All i've done is add ' ' around $dis
HTH
GM
[QUOTE][i]Originally posted by thefisherman [/i]
[B]Hello,
I have something strange here:
I try to write values to a table, one of the values is the session_id(), like this:
$dis=session_id();
$write_statement = "INSERT INTO cartdata (cid, cdesc, csize, cres, cprice, cust)
VALUES($cartidnum, '$cartdesc', '$size_var', '$res_var', '$price_var', $dis)";
mysql_query($write_statement) or die(mysql_error());
Where 'cust' is the field (int (32)) where $dis should be written to.
And this is what i get:
Unknown column '1454960b453555e0f9fab3029fb8f0c5' in 'field list'
I don't get it..
Anyone?
Thanks in advance
theFisherMaN [/B][/QUOTE]