Wednesday, September 18, 2013

How do I pass a multistring variable into php through a parameter

How do I pass a multistring variable into php through a parameter

How do I send in a "multi"-string variable(looking like this: 1,2.3,4)
into a php through a parameter which goes through an url.
Lets say some of the php that is connected to the mysql server looks
something like this
`$id_ = $_GET['id'];`
`$q=mysql_query("SELECT * FROM brain WHERE braincell_id in ('$id_');`
And the variable that goes into it is: id = 1,2,3,4
How can I make this work?
What I am using currently and that does work:
$q=mysql_query("SELECT * FROM brain WHERE braincell_id in ("$_GET['id']");

No comments:

Post a Comment