|
-
April 27th, 2003, 01:00 PM
#1
php and apache problem
I'm trying to set up the apache server with php as a module so that i can test scripts. I don't want to host anything. When i create a simple html and php file to work together it doesn't eg
index.html
<html><body>
<form method = 'post' action = ./name.php>
<input type = 'text' name = 'fname'>
<input type = 'submit' value = 'submit'>
</form</body></html>
name.php
<?php
$test = 'test';
print $fname;
print $test;
?>
when i view this using http:\\localhost
i see index.html enter a name hity submit, but then all it shows is the value in $test, not in $fname?
any ideas, i'm assuming it must be how i installed apache and php, but i thought i followed everything.
i'm using win 98se, apache1.3.27 and php4.3.1
when apache console opens it gives no errors and says php is running.
-
April 27th, 2003, 01:26 PM
#2
You cannot use globals for posted variables if register_globals is off, I recommend you leave it that way (it is off by default)
Try
PHP Code:
$_POST['fname']
Instead of just $fname
-
April 27th, 2003, 09:24 PM
#3
Cheers, works fine now, just read the bit in php.ini about the register_globals being off, think i'll take yours and there advice and leave it off, figure best to try and learn it the right way 
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|