p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: NEED HELP!


Message #1 by "Shao-Yu Chen" <sychen73@h...> on Thu, 4 Apr 2002 22:27:19
I have followed the Beginning PHP 4 to setup Internet Information Server 
5.0 on Windows 2000 from page 23-28. I have also downloaded PHP4 from 
php4win.de. Then, I tried to run the code on Chapter 3 page 76-77, and I 
still can not get the author's name to show on the second page. I make 
sure that both text.html and text.php have Author for html and $Author for 
php variable. What can I do to fix that problem? Thank you.
Message #2 by "Nikolai Devereaux" <yomama@u...> on Thu, 4 Apr 2002 13:55:21 -0800
I don't have the book, so I don't know what the code is, but I think this is
another register_globals problem.

My guess is that the value IS being sent by the form, and your script is
getting it correctly.

Chances are you've got register_globals="off" in your php.ini file, which
means you're supposed to access the form data via $_GET['Author'] or
$_POST['Author'], depending on what your form method was.

Since you're not getting a warning, I'm thinking that your error_reporting
line in php.ini is either commented out or set to E_ALL & ~E_NOTICE (which
would suppress a warning that you're using $Author without initializing it
first.)

If you're still having problems after checking php.ini and/or modifying your
code, please paste the relevant code snippets back and we'll try something
else.


take care,

nik


  Return to Index