URL parsing to get variables name

Reply

Join Date: Oct 2004
Posts: 29
Reputation: trashed is an unknown quantity at this point 
Solved Threads: 0
trashed trashed is offline Offline
Light Poster

URL parsing to get variables name

 
0
  #1
Jan 23rd, 2007
hi.
maybe the solution to my problem is quite obvious but I can't find it, so I'm asking here.I'm building a small movie db with the chance for users to borrow the title they want.
the movies' info is fetched from a db and displayed in a html table.
this table has a column containing a checkbox named as the numeric ID of the movie:
[PHP]<input name="'.$id.'" type="checkbox">[/PHP]

now, I want to create a confirmation page before the user sends in the form with what he/she wants to borrow, but I can't figure out how to parse the URL.
when I submit the form with GET method, I get something like this:order_preview.php?name=Andrea&205=on&206=on&Submit=Send
I can see that the numbers represent the checkboxes selected but how do I parse the URL to get those numbers and not the "on" value?

thanks

Andrea
Last edited by trashed; Jan 23rd, 2007 at 3:37 pm.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: URL parsing to get variables name

 
0
  #2
Jan 23rd, 2007
  1. foreach ($_GET as $key => value)
  2. {
  3. echo $key . "<br />";
  4. }
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 29
Reputation: trashed is an unknown quantity at this point 
Solved Threads: 0
trashed trashed is offline Offline
Light Poster

Re: URL parsing to get variables name

 
0
  #3
Jan 23rd, 2007
thanks.
i'll see if it can solve my troubles
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC