You need something to catch the variables. Look at phpnuke source for some good examples.
Something like switch($variableName) would probably work.
My variables in PHP don't seem to be working as they should. If I make a simple file like so:
<html>
<body>
<?php
echo "$testage";
?>
</body>
</html>
and then go to it using http://www.myserver.com/filename.php?testage=words The file displays nothing. If I add the line:
$testage = "words";
to the php file it works fine and displays the value of $testage. Does anyone know why I can't send variables this way to my php files? I can't seem to send them any other way either (using forms). Any help would be much appreciated!
You need something to catch the variables. Look at phpnuke source for some good examples.
Something like switch($variableName) would probably work.
Okay...that's not really the answer i was looking for. If I go to another server using the same file, then use filename.php?testage=word it outputs "word" as the file. I seem to remember something about "enable_track_vars" or something like that...I think that was needed during setup of PHP (I used a different tutorial for setup on this server). Is this right? Any thoughts? I should be able to do this without adding any code to the php...I'm sure of this. If I do need to add another attribute for php, would I have to reinstall it? Thanx for the help so far.
You are using mod_php on Apache right?
I'm loading php into apache as a DSO
What exactly are you striving to accomplish? I need a real-world example in order to help you out with this.
So far my understanding is that youre trying to set the value of the variable through the browser.....is that correct ?
Okay, my real world example is as you guessed, I have a file like this:
<html>
<body>
<?php
echo "$testage";
?>
</body>
</html>
and I'm trying to set the variable testage from the browser. On my Apache server with PHP loaded in as a DSO the variable can't be passed through the browser. My guess is that PHP is somehow set up incorrectly, I'm wondering if anyone knows how to fix the problem.
filename.php?testage=value
gives me nothing.
Bookmarks