Generally, you pass variables with
http://?variable1=value[&variable2=value2&variable3=value...]
This is simple to do is PHP -- if sessions isn't working for you, then something is wrong with the way you're using them.
Here; maybe this will help: http://www.plus2net.com/php_tutorial/variables.php
2006-12-06 16:49:53
·
answer #1
·
answered by Mark H 4
·
0⤊
0⤋
Here is a quick run through of what you can do.
I don't have time to really Test it but if you run into
any problems just email me at void_3e01@yahoo.com
and I'll rework it for ya, anyway here ya go:
(index.php)
?>
Index page
More...
(parseLink.php)
$tid = $_POST['tid'];
if($tid == NULL){
echo("ERROR: tid cannot equal null");
}
else
{
$_SESSION['TID'] = $tid;
if($tid == "001")
{
require("001.php");
}
else
{
echo("ERROR: Could not find page: " . $tid);
}
}
?>
(001.php)
echo("Topic stuff here");
?>
index.php has the link to parseLink.php
parseLink.php will extract the topic id from the
URL and then decide which topic to show.
In this case it's topic 001 and so using 1 more PHP
file we make 001.php which simply echo's the info.
Play around with it, let me know if you need anything.
Oh also, in parseLink it assigns a session variable called
TID to the value of $tid which is 001 if you put
echo($_SESSION['TID']);
cheers
-Void
2006-12-07 03:32:04
·
answer #2
·
answered by Hex 5
·
0⤊
0⤋
Pass the variable in the URL.
Edit: If you don't know how to pass a URL parameter, then you don't yet know enough to be programming in PHP. Go back and find out how to do that.
2006-12-07 00:41:58
·
answer #3
·
answered by MarnenLK 6
·
0⤊
0⤋
URL parameters look like:
www.blaw.com/mypage.php?var1= test&var2=stuff
lookup "query string" in your PHP programming guide for information on how to retrieve these variables for use in your code.
2006-12-07 00:48:14
·
answer #4
·
answered by Jason H 2
·
0⤊
0⤋
add to your path link '?' and variable like this
(
and then type this code to see your value in new page
("")
2006-12-07 04:12:09
·
answer #5
·
answered by alnakash 1
·
0⤊
0⤋