Henrik Hansen <hh****@fsck.dk> wrote in
news:R7********************@news000.worldonline.dk :
Phi wrote: Hi there,
I've just started learning php and I hope you guys could help me with
this problem. I've found a useful pice of code from a book to make a
form and I would like to use it. I would like to print the variables
(input) on the screen , but I can't make it work. I think I have to
do something with an array, but don't know what. I've tried
$field = $_POST['field'];
echo $field;
and also
$arr = $_POST['array'];
print_r($arr);
but it doesn't work.
Could some one show me what I'm missing?
Thanks a bunch!
try to make a phpinfo(); on the page you submit to and see if the
variables are there (almost at the bottom).
I don't know if it's this what you mean. Thanks for your time again...
phpinfo();
################################################## #############
_REQUEST["Array"] test test test
_GET["Array"] test test test
_SERVER["HTTP_HOST"] localhost
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.2; en-
US; rv:1.7) Gecko/20040626 Firefox/0.8
_SERVER["HTTP_ACCEPT"] application/x-shockwave-
flash,text/xml,application/xml,application/xhtml+xml,text/html;q=
0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/
*;q=0.1
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["PATH"] C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\Sys tem32
\\Wbem;C:\\Program Files\\ATI Technologies\\ATI Control Panel;C:\\Program
Files\\Microsoft SQL Server\\80\\Tools\\BINN
_SERVER["SystemRoot"] C:\\WINDOWS
_SERVER["COMSPEC"] C:\\WINDOWS\\system32\\cmd.exe
_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_SERVER["WINDIR"] C:\\WINDOWS
_SERVER["SERVER_SIGNATURE"] <address>Apache/2.0.50 (Win32) PHP/4.3.7
Server at localhost Port 80</address>
_SERVER["SERVER_SOFTWARE"] Apache/2.0.50 (Win32) PHP/4.3.7
_SERVER["SERVER_NAME"] localhost
_SERVER["SERVER_ADDR"] 127.0.0.1
_SERVER["SERVER_PORT"] 80
_SERVER["REMOTE_ADDR"] 127.0.0.1
_SERVER["DOCUMENT_ROOT"] Z:/www/apache
_SERVER["SERVER_ADMIN"]
wh*********@nomail.com
_SERVER["SCRIPT_FILENAME"] Z:/www/apache/_faq/func/autoform2.php
_SERVER["REMOTE_PORT"] 2168
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"]
Array=test+test+test&Array=test+test+test&Array=te st+test+test&Array
=test+test+test&Array=test+test+test
_SERVER["REQUEST_URI"] /_faq/func/autoform2.php?
Array=test+test+test&Array=test+test+test&Array=te st+test+test&Array=test
+test+test&Array=test+test+test
_SERVER["SCRIPT_NAME"] /_faq/func/autoform2.php
_SERVER["PHP_SELF"] /_faq/func/autoform2.php
_SERVER["PATH_TRANSLATED"] Z:/www/apache/_faq/func/autoform2.php
_SERVER["argv"]
Array
(
[0] => Array=test
[1] => test
[2] => test&Array=test
[3] => test
[4] => test&Array=test
[5] => test
[6] => test&Array=test
[7] => test
[8] => test&Array=test
[9] => test
[10] => test
)
_SERVER["argc"] 11
_ENV["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users
_ENV["ClusterLog"] C:\\WINDOWS\\Cluster\\cluster.log
_ENV["CommonProgramFiles"] C:\\Program Files\\Common Files
_ENV["COMPUTERNAME"] TOWER
_ENV["ComSpec"] C:\\WINDOWS\\system32\\cmd.exe
_ENV["INCLUDE"] C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK
\\v1.1\\include\\
_ENV["LIB"] C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK
\\v1.1\\Lib\\
_ENV["NUMBER_OF_PROCESSORS"] 2
_ENV["OS"] Windows_NT
_ENV["Path"] C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\Sys tem32
\\Wbem;C:\\Program Files\\ATI Technologies\\ATI Control Panel;C:\\Program
Files\\Microsoft SQL Server\\80\\Tools\\BINN
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_ENV["PROCESSOR_ARCHITECTURE"] x86
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 6 Model 8 Stepping 3,
GenuineIntel
_ENV["PROCESSOR_LEVEL"] 6
_ENV["PROCESSOR_REVISION"] 0803
_ENV["ProgramFiles"] C:\\Program Files
_ENV["SystemDrive"] C:
_ENV["SystemRoot"] C:\\WINDOWS
_ENV["TEMP"] C:\\WINDOWS\\TEMP
_ENV["TMP"] C:\\WINDOWS\\TEMP
_ENV["USERPROFILE"] C:\\Documents and Settings\\NetworkService
_ENV["VS71COMNTOOLS"] C:\\Program Files\\Microsoft Visual Studio .NET 2003
\\Common7\\Tools\\
_ENV["windir"] C:\\WINDOWS
_ENV["AP_PARENT_PID"] 1384
################################################## #############