Jump to content

[SOLVED] Multiple $ help


nathan1

Recommended Posts

event.php?event_id=23?user_id=1

 

//getting the first id
$id = $_GET['event_id'];
$result = mysql_query("SELECT * FROM events WHERE event_id=$id") or die("Error querying customer database1");

 

//getting the first id
$user_id = $_GET['user_id'];

 

 

i get a error querying database, but i didnt get this error before i added the other $....so im thinking it cant tell were one ended and another began ?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/120836-solved-multiple-help/#findComment-623630
Share on other sites

you want a question mark at the end of the filename so like this

 

page.php?

then you just list your items

id=what

eventid=whatever

then you add them together with a &

 

so like this

page.php?id=what&eventid=whatever

 

you need the & sign when there is more then 1 thing and for each thing just add another &

 

like this

page.php?id=what&eventid=whatever&something=this

 

help at all?

Link to comment
https://forums.phpfreaks.com/topic/120836-solved-multiple-help/#findComment-623633
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.