 |
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5  | This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

March 4th, 2004, 03:59 PM
|
Authorized User
|
|
Join Date: Mar 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Bad Codes from Chapter 3 and on, Please Help!
OK I am a Graphic Designer learning PHP4. All the codes from chatper 3 on don't work. How am I going to learn PHP from this book? Some people are saying turn off register_globals and others are saying don't because security problems bah bah bah! I like the way the book is layout and don't want to buy a new book so how are you learning from the bad codes.
If WROX said they want to help clients with problems and error. Why is the download codes still the same as the old PHP standards? Why don't they have two folder with old and new files for the change of codes.
Remember some people that are reading the book don't have all the time in the world to search the net for answers. That is why I bought this book to learn for pro's.
When is the new Beginning PHP, Apache, MySQL Web Development out? I can find it at books stores.
Thanks
Joe
|

March 4th, 2004, 04:51 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Simple answer: The book you have was originally published by Wrox before they tanked and were bought out by Wiley. The original authors are under no obligation, nor would they be paid, to rewrite the code because of changes to PHP's default configuration.
The simplest thing to do is to turn register_globals ON while learning PHP, but to always bear in mind that it's a bad thing to do in an actual production application.
Take care,
Nik
http://www.bigaction.org/
|

March 4th, 2004, 06:09 PM
|
Authorized User
|
|
Join Date: Mar 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How do you turn register_globals ON?
Is it in php.ini? I am a newbie so can you give me a basic answer?
Thanks
|

March 7th, 2004, 02:26 AM
|
Registered User
|
|
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
start -> run -> type php.ini
search for keywords register_globals
amend the configuration register_globals = on
thats it! =)
|

March 12th, 2004, 03:53 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I also suggest you set error_reporting = E_ALL & ~E_NOTICE. This will suppress all the "uninitialized index" and "uninitialized variable" warnings that you'll undoubtedly get using the code from the old books.
Take care,
Nik
http://www.bigaction.org/
|

March 12th, 2004, 04:05 PM
|
Registered User
|
|
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I changed my setting to register_global=on and the code still doesn't work! Any other suggestions other than throwing away the book and starting over with new material?
Thanks,
Brian
|

March 17th, 2004, 08:16 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
What doesn't work?
I'd verify your settings by running a phpinfo script:
<?php phpinfo(); ?>
This will generate a page containing all the active PHP settings and all global variables.
Take care,
Nik
http://www.bigaction.org/
|

March 17th, 2004, 08:29 PM
|
Registered User
|
|
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I did that and it still didn't work. I found a better solution, I returned the book and went back to the tried and true Sam's Publishing. Thanks for the input.
Brian K. Forrester
|

March 23rd, 2004, 05:06 AM
|
Registered User
|
|
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
What should i change if i off de global variables, since de code below doesnt works.
<HTML>
<HEAD></HEAD>
<BODY>
<?php
echo "Price Range: $Price";
echo "<BR>Engine Size(s): $EngineSize[0]";
echo "$EngineSize[1]";
echo "$EngineSize[2]";
echo "$EngineSize[3]";
?>
</BODY>
</HTML>
|

March 23rd, 2004, 11:44 AM
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Are you trying to get these variables from the address bar?
If so you probably need $_GET
Ex: $_GET['Price'] instead of $Price
If this does not work, I need more info on your problem....
Also, does this code apply to this book (Beginning PHP4)? If not you should be posting in one of the PHP forums....
----------
---Snib---
----------
<><
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Bad SQL in Try It Out in chapter 3 |
punch |
BOOK: Beginning SQL |
1 |
August 18th, 2006 06:39 PM |
Chapter 12, Try It Out, p.454, bad TagPrefix |
VictorVictor |
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 |
3 |
February 23rd, 2006 02:39 PM |
Why session_register() is bad. |
nikolai |
Pro PHP |
17 |
November 21st, 2004 09:35 PM |
error codes, Chapter 8, Page 218 |
JohnAlden |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
1 |
June 19th, 2004 11:02 AM |
|
 |