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.

PHP Forum


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



Freelance Jobs

Reply
creating index.php?x=blah
Old 04-10-2005, 05:31 AM creating index.php?x=blah
Junior Talker

Posts: 1
Trades: 0
Can someone please direct me to an easy way of doing this(not using the Jump to Url script). I never done this before and cant find a script for it. Btw, what is this type of script actually known as? Thank you.
xaqshun is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-10-2005, 06:23 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
There's no script for this as such, really this is just something that happens in a lot of scripts for many purposes. There are a number ways of passing variables from one page to another. x in this case is called a 'get' variable. To use them, you can either:
1) Create a form, and specify the method attribute of the form to be "GET". When the form is submitted, the page specified in the action attribute is loaded, with a ? on the end followed by a list of all the variables in the form.
2) You can instead just write the link directly. <a href="page.php?var=53">link</a> will work just fine.

In the page that receives the variable, (the action attribute page, or page.php in the second case), you can get back the value of the get variables from the $_GET array that php provides:
eg on page.php:
PHP Code:
<?php
$k 
$_GET['var'];

echo 
$k//Echoes 53, or whatever value you put in the link.

?>
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Reply     « Reply to creating index.php?x=blah
 

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.09616 seconds with 12 queries