maddcow26 Posted September 24, 2008 Share Posted September 24, 2008 This is my insert : $query = "INSERT INTO formresults (qname, qemail, qaddress, burlap, gender, primarystyle, yearsprimary, yearsgrappling, weekly, stephanquestion, visitorsince, dvdpurchase) VALUES ('qname', 'qemail', 'qaddress', 'burlap', 'gender', 'primarystyle', 'yearsprimary', 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase')"; It inserts to the database but it is inserting the value names (ie, qname) instead of the actual value (field name) passed from the form. How do I fix this? thanks in advance Link to comment https://forums.phpfreaks.com/topic/125664-solved-inserting-the-value-name-instead-of-the-actual-value/ Share on other sites More sharing options...
thesaleboat Posted September 24, 2008 Share Posted September 24, 2008 mysql_query("INSERT INTO `users_subcategories` (`username`, `SubCategoryId`) VALUES ('$myusername','$subcategory');") or die(mysql_error()); Here is what i use, you have to use the $ sign Link to comment https://forums.phpfreaks.com/topic/125664-solved-inserting-the-value-name-instead-of-the-actual-value/#findComment-649731 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 Beautiful. thanks buddy Link to comment https://forums.phpfreaks.com/topic/125664-solved-inserting-the-value-name-instead-of-the-actual-value/#findComment-649742 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.