Jump to content

What's wrong with this sql query?


lpxxfaintxx

Recommended Posts

$marital = form($_POST['marital']);

$sexpref = form($_POST['sexpref']);

$relview = form($_POST['relview']);

$polparty = form($_POST['polparty']);

$music = form($_POST['music']);

$books = form($_POST['books']);

$movies = form($_POST['movies']);

$shows = form($_POST['shows']);

$aboutme = form($_POST['aboutme']);

$userid = form($_POST['userid']);

 

 

 

$query = "UPDATE users SET marital='$marital',$sexpref='$sexpref',relview='$relview',polparty='$polparty',music='$music',books='$books',movies='$movies',tv='$shows',aboutme='$aboutme' WHERE user_id='$userid'" ;

mysql_query($query) or die ("Error in query: $query");

 

 

 

I get an error, but I can't figure out what I did wrong. I looked at working examples, and they are structured the same.

Link to comment
https://forums.phpfreaks.com/topic/138058-whats-wrong-with-this-sql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.