Having some issues with this line of code:
$usersql= mysql_query("INSERT INTO tp_request (user_id, week_no, floor, code) VALUES ($insertuser, $week, $floor, $code)");
Variable values are as follows:
$insertuser = 1;
$week = 4;
$floor = "First";
$code = "ABC123";
Both $insertuser and $week go into the database without issue when used together without the other two variables. However, when $floor and $code are used, nothing gets entered into the database. They both echo correctly on their own as "First" and "ABC123" respectively.
The fields in the database have been tried as both Text and VarChar and it's not working with either of these.
Any ideas on how to get $floor and $code to work here?