Hi everyone..
I am new to php. I have PHP4.2.3 installed with Apache on my computer. I was
practicing on the language from a book called "PHP essentials" by Julie C Meloni. I
am facing many problems as many functions from php3 are not working anymore in PHP4!
For example, header(), include(mydata.txt); and mail(). Also, to recieve variables
from an HTML form, i had to add HTTP_POST_VARS("")!! how would I know that i have to
add that?!. I have many similar problems due to the differences between the two
version. I have 2 questions:
1. Is there any source (book or URL or whatever) that shows what have been changed
between php3 and php4 and what are the new functions or values are? Something like a
table or differences in functions.
2. How do u get the mail() and include() to work?
Also, who do u get header() to header() function to work in PHP4?? This is the code i
am using for the header() followed by the error message:
===CODE
if (!isset($PHP_AUTH_USER)) {
// If empty, send header causing dialog box to appear
header('WWW-Authenticate: Basic realm="My_Private_Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
// If not empty, display values for variables
else {
echo "
You have entered this username: $PHP_AUTH_USER
You have entered this password: $PHP_AUTH_PW
The authorization type is: $PHP_AUTH_TYPE"; }
===ERROR
Warning: Cannot add header information - headers already sent by (output started at
C:\Program Files\Apache Group\Apache2\htdocs\auth.php:9) in C:\Program Files\Apache
Group\Apache2\htdocs\auth.php on line 17
Warning: Cannot add header information - headers already sent by (output started at
C:\Program Files\Apache Group\Apache2\htdocs\auth.php:9) in C:\Program Files\Apache
Group\Apache2\htdocs\auth.php on line 18
Authorization Required.
Please help me here ...
-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more