Thank you very much.... I'm gonna test it!
Por cierto, Fernado, hablas español? yo soy de barcelona
marc
"Fernando Madruga" <[EMAIL PROTECTED]> escribió en el mensaje
3685A91F554BD411BA310008C759B6CC02527BFC@MAIL_CBR">news:3685A91F554BD411BA310008C759B6CC02527BFC@MAIL_CBR...
I have PHP 4.0.4 and I get the same error...
After retyping the whole line manually (no copy/paste), it stopped
complaining!
There's a missing parentheses on that line between 'each' and
'$HTTP_GET_VARS' !!
However, even though it does not complain, it still doesn't give the values
expected!!
Well... It would be somewhat dificult to work!!! The function is not called
anywhere!!!!
Also, it would not work because of another error on the second 'each' line:
it should be each $val_child!!!
So, here's a rewrite of that code, complete with a table style dump, and a
sample form to test it, all in the same file. Just save this as whatever.php
or something else somewhere in your site and point your browser at it...
Don't forget the following though:
"In PHP 4, the behaviour is slightly different, in that the new global array
$HTTP_POST_FILES is provided to contain the uploaded file information. This
is still only available if track_vars is turned on, but track_vars is always
turned on in versions of PHP after PHP 4.0.2."
If you're using PHP3, you may have to change your php.ini to turn on
track_vars...
This code WORKS on my Apache 1.3.14 + PHP 4.0.4...
Have fun,
Fernando Madruga
----------------------------------------------------------------------------
--------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?
function DumpHttpGetVars() {
global $HTTP_GET_VARS;
if( $HTTP_GET_VARS ) {
echo "<table cols=3 border=1>\n";
reset ( $HTTP_GET_VARS );
while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) ) {
echo "<tr><td colspan=2>$key</td><td>$val</td></tr>\n";
if ( "array" === GetType( $val ) ) {
reset( $val );
while ( list( $childKey, $childValue ) = each($val) ) {
echo
"<tr><td> </td><td>$childKey</td><td>$childValue</td></tr>\n";
}
}
}
echo "</table>\n";
}
}
if (!$submit) { // Create a form to use GET
?>
<form action="<? echo $SCRIPT_NAME ?>" method="get">
Just to test<br>
<input type="text" size="40" name="test" value="something">
<input type="submit" name="submit" value="Go!">
<br><select multiple name="beer[]">
<option value="warthog">Warthog
<option value="guinness">Guinness
<option value="stuttgarter">Stuttgarter Schwabenbräu
</select>
</form>
<?
} else { // process submited data
?>
<p><? echo $SERVER_ADDR; ?></p>
<p><? echo $REMOTE_ADDR; ?></p>
<p><? echo $HTTP_USER_AGENT; ?></p>
<p><? DumpHttpGetVars(); ?></p>
<?
} // end if submit
?>
</body>
</html>
----------------------------------------------------------------------------
----------------------
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]