944,006 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5778
  • PHP RSS
Jan 23rd, 2007
0

URL parsing to get variables name

Expand Post »
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.
Similar Threads
Reputation Points: 11
Solved Threads: 0
Light Poster
trashed is offline Offline
30 posts
since Oct 2004
Jan 23rd, 2007
0

Re: URL parsing to get variables name

php Syntax (Toggle Plain Text)
  1. foreach ($_GET as $key => value)
  2. {
  3. echo $key . "<br />";
  4. }
Moderator
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
stymiee is offline Offline
1,422 posts
since May 2006
Jan 23rd, 2007
0

Re: URL parsing to get variables name

thanks.
i'll see if it can solve my troubles
Reputation Points: 11
Solved Threads: 0
Light Poster
trashed is offline Offline
30 posts
since Oct 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP mail function issue
Next Thread in PHP Forum Timeline: View HTML source in php page?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC