Page 1 of 1
Falling at the first hurdle
Posted: Sun Nov 17, 2002 5:07 pm
by stevieg
I have just installed php and i am able to use various functions. However
when i post a form:
<form action="action.php" method="POST">
Your name: <input type="text" name="name" />
Your age: <input type="text" name="age" />
<input type="submit">
</form>
And use action.php containing:
Hi <?php echo $_POST["name"]; ?>.
You are <?php echo $_POST["age"]; ?> years old.
I get:
Hi . You are years old.
I get no variable comming through.
the following also produces nothing:
<?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
Any ideas?
Steve
[/quote]
Posted: Sun Nov 17, 2002 5:41 pm
by hob_goblin
try running
<? phpinfo(); ?>
and make sure track_vars is turned on in your php.ini
Posted: Mon Nov 18, 2002 1:48 am
by stevieg
Thanks for that suggestion. Unfortunately doesn't solve the problem
the ini file states:
; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
This is some of the information that <? phpinfo(); ?> gave me:
allow_call_time_pass_reference
On On
allow_url_fopen
1 1
arg_separator.input
& &
arg_separator.output
& &
asp_tags
Off Off
auto_append_file
no value no value
auto_prepend_file
no value no value
browscap
no value no value
default_charset
no value no value
default_mimetype
text/html text/html
define_syslog_variables
Off Off
disable_functions
no value no value
display_errors
On On
display_startup_errors
Off Off
doc_root
no value no value
enable_dl
On On
error_append_string
no value no value
error_log
no value no value
error_prepend_string
no value no value
error_reporting
2039 2039
expose_php
On On
extension_dir
C:\phpdev\php\extensions C:\phpdev\php\extensions
file_uploads
1 1
gpc_order
GPC GPC
highlight.bg
#FFFFFF #FFFFFF
highlight.comment
#FF9900 #FF9900
highlight.default
#0000CC #0000CC
highlight.html
#000000 #000000
highlight.keyword
#006600 #006600
highlight.string
#CC0000 #CC0000
html_errors
On On
ignore_user_abort
Off Off
implicit_flush
Off Off
include_path
no value no value
log_errors
Off Off
magic_quotes_gpc
On On
magic_quotes_runtime
Off Off
magic_quotes_sybase
Off Off
max_execution_time
30 30
open_basedir
no value no value
output_buffering
Off Off
output_handler
no value no value
post_max_size
8M 8M
precision
14 14
register_argc_argv
On On
register_globals
On On
safe_mode
Off Off
safe_mode_exec_dir
no value no value
sendmail_from
phpdev@firepages.com.au phpdev@firepages.com.au
sendmail_path
no value no value
short_open_tag
On On
SMTP
no value no value
sql.safe_mode
Off Off
track_errors
Off Off
upload_max_filesize
2M 2M
upload_tmp_dir
no value no value
user_dir
no value no value
variables_order
EGPCS EGPCS
y2k_compliance
Off Off
Posted: Mon Nov 18, 2002 3:08 am
by twigletmac
Hi, which OS, webserver (type and version) and version of PHP are you running?
Mac
Posted: Mon Nov 18, 2002 11:44 am
by stevieg
I'm running Apache 1.3.20 On Windows 2000. The whole package was downloaded from
http://www.firepages.com.au (phpdev).
Posted: Tue Nov 19, 2002 6:22 am
by twigletmac
When you look at the output from phpinfo() what version of PHP does it say you are running?
Mac