Posts: 1,832
Location: Somewhere else entirely
|
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)
|