p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: No Variable shown after submit!


Message #1 by "Ruben van Tienen" <info@v...> on Sun, 4 Feb 2001 15:29:17 -0000
maybe you all can help me with this.

 Im learning PHP4 since 2 days now with 'beginning PHP4' and followed

everything very closely.

made files text.html and text.php as described in the book page79,

installed IIS5 on my windows 2000 and PHP4.

other things work, except that I don't see anything in return when I open

text.html and fill out something after I press submit and go to the next

page where it does NOT show the variable.

maybe you know why I don't see it in return.



I even copied the files from wrox.com to see if I did everything right and

I

did, I even tried those files but ended up with the same problems.

All the tests on the server worked fine.

untill chapter 3 there where no problems.



Please help me,



Thanks,

Ruben



Message #2 by "Joel Wickard" <jwickard@l...> on Fri, 9 Feb 2001 08:45:48
jwickard@l...



email me with the specific code you're trying to run, and I'll walk you through it.
Message #3 by "E van Koperen" <ellert@a...> on Thu, 15 Feb 2001 09:43:58
One thing that is often overlooked is that you should take great care to

correctly define the start AND the end tag of the form.

If you forget the end tag you will see the form but it will not work.



This peice of code will probably prove a boon in development:

( it prints out all http variabeles, get post and cookies )



<?php



function dump_http_vars(){

  global $HTTP_POST_VARS;

  global $HTTP_GET_VARS;

  global $HTTP_COOKIE_VARS;



  print("post:<br>");

  while(list ($key, $val) = each($HTTP_POST_VARS)){

    print("$key = $val <br>\n");

  }

  print("<hr>");

  print("get:<br>");

  while(list ($key, $val) = each($HTTP_GET_VARS)){

    print("$key = $val <br>\n");

  }

  print("<hr>");

  print("cookies:<br>");

  while(list ($key, $val) = each($HTTP_COOKIE_VARS)){

    print("$key = $val <br>\n");

  }

  print("<hr>");

}



?>

  Return to Index