If i pass a php script a value from a webpage how can i have to return the value ?
I know how to get the incoming data using $_GET or $HTTP_POST_VARS the process or whatever bit don't know how to actually return the reuslts to the page.
Printable View
If i pass a php script a value from a webpage how can i have to return the value ?
I know how to get the incoming data using $_GET or $HTTP_POST_VARS the process or whatever bit don't know how to actually return the reuslts to the page.
Well,
If the URL is something along the lines of
http://www.example.com/file.php?id=34
Then to show the value of id you would do this.
orCode:<?
$id = $_GET['id'];
echo $id;
?>
If it is a POST value then it is basically the same,Code:<?
$id = $_REQUEST['id'];
echo $id;
?>
orCode:<?
$id = $_POST['id'];
echo $id;
?>
I hope this helps =)Code:<?
$id = $_REQUEST['id'];
echo $id;
?>