Hello,
For some reason when I try to submit the values of variables the string appearence of the variable is shown instead of its actual contents. For instance,
-region1_g1's value is determined by a drop down menu (in this case, it is #1)
-i then create the variable $region1_g1 by using $region1_g1=$HTTP_POST_VARS['region1_g1'];
-i then add slashes for the database entry by using $region1_g1 = addslashes($region1_g1);
I have no problem connecting with the database. But everytime I input $region_g1 the database entry is $region_g1 instead of its value, which is #1. The variable is specified as a VARCHAR(20) in the SQL database. Here is what my insert code looks like.
$query = 'INSERT INTO `Picks` ( `firstn` , `lastn` , `id` , `region1_g1`, etc etc) VALUES ( '$nc' , '$nc' , \'33\',
'$region1_g1', etc etc)'
There are more fields but I omitted them due to space. I have a feeling that I'm missing something very easy and if anyone could help it would be greatly appreciated.
For some reason when I try to submit the values of variables the string appearence of the variable is shown instead of its actual contents. For instance,
-region1_g1's value is determined by a drop down menu (in this case, it is #1)
-i then create the variable $region1_g1 by using $region1_g1=$HTTP_POST_VARS['region1_g1'];
-i then add slashes for the database entry by using $region1_g1 = addslashes($region1_g1);
I have no problem connecting with the database. But everytime I input $region_g1 the database entry is $region_g1 instead of its value, which is #1. The variable is specified as a VARCHAR(20) in the SQL database. Here is what my insert code looks like.
$query = 'INSERT INTO `Picks` ( `firstn` , `lastn` , `id` , `region1_g1`, etc etc) VALUES ( '$nc' , '$nc' , \'33\',
'$region1_g1', etc etc)'
There are more fields but I omitted them due to space. I have a feeling that I'm missing something very easy and if anyone could help it would be greatly appreciated.