Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
how can i refrence data after a the question mark in the Url
Old 07-23-2009, 01:25 AM how can i refrence data after a the question mark in the Url
Experienced Talker

Posts: 41
Trades: 0
im using links like
<a href="exsample.php?1">
<a href="exsample.php?2">
<a href="exsample.php?3">
<a href="exsample.php?4">
how can i refrence the number after the question mark
flatrat is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-23-2009, 03:38 AM Re: how can i refrence data after a the question mark in the Url
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
What server side language do you use ?
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 07-23-2009, 06:53 AM Re: how can i refrence data after a the question mark in the Url
Average Talker

Posts: 16
Name: Kevin Frank
Location: USA
Trades: 0
Quote:
Originally Posted by flatrat View Post
im using links like
<a href="exsample.php?1">
<a href="exsample.php?2">
<a href="exsample.php?3">
<a href="exsample.php?4">
how can i refrence the number after the question mark
Hi,

I think you should use any variable to refer data like

<a href="exsample.php?var=1"> and then at exsample.php you can use get method to use data.

Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Hostingref is offline
Reply With Quote
View Public Profile Visit Hostingref's homepage!
 
Old 07-23-2009, 10:44 AM Re: how can i refrence data after a the question mark in the Url
Junior Talker

Posts: 4
Trades: 0
Quote:
Originally Posted by tripy View Post
What server side language do you use ?
erm..., just look at the php at the end of the links urls...

I would also suggest using a var-name for each element you add to the url:

http://your-domain.com/index.php?var1=xxx&var2=yyy
__________________

Please login or register to view this content. Registration is FREE
Pixel King is offline
Reply With Quote
View Public Profile Visit Pixel King's homepage!
 
Old 07-23-2009, 04:56 PM Re: how can i refrence data after a the question mark in the Url
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
[QUOTE][erm..., just look at the php at the end of the links urls.../QUOTE]
Meh.. Talk about blindness....


In that case, you can refer each elements into the $_GET array.
If you have a link that is http://www.whatever.com/index.php?confirm=1&go=page2, then you will have an $_GET array in this form:
PHP Code:
$_GET['confirm']='1';
$_GET['go']='page2'
You can iterate over it with a foreach statement like PixelKing stated:
PHP Code:
foreach($_GET as $key=>$value){
  echo 
"The value of $key is $value<br/>";

__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to how can i refrence data after a the question mark in the Url
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.51216 seconds with 12 queries