Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
 
Old October 27th, 2004, 02:49 PM
Authorized User
 
Join Date: Oct 2004
Location: Denver, CO, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default POST & GET not working on local VirtualHost

I have Beginning PHP 4 and It's a great book! It's helped me learn some things for a current project already. However, i've decided to start from the beginning and work my way through and I'm already stuck. In the "Getting Data from the Client" section on using GET and POST i'm getting no results. My code is perfect and yes I reviewed the "Why this example might not be working for you" section and everything checks out. However, when i submit the form i get the .php page back but the variables ($Authors and $WebSites) aren't ECHO'd back as they should be. I also don't get any error messages and no errors show in my Apache error log. I'm almost positive i need to adjust some aspect of the http.conf file to allow this all to function, but i'm clueless...anyone have suggestions?

I'm developing locally using VirtualHosts if that makes any difference?

Cheers!
 
Old October 27th, 2004, 03:03 PM
Authorized User
 
Join Date: Oct 2004
Location: Denver, CO, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks to Daniel Walker's response to this post i figured it out.
http://p2p.wrox.com/topic.asp?TOPIC_ID=17661

In the book it says you simply echo back the variable like so...
<?php echo "$Author"; ?> // Which doesn't work (for me :)

However, for me (Different version of PHP?) this does work...
<?php echo ($_GET['author']); ?>

If anyone has an explanation for this i'd appreciate it. I don't *think* it's an error in the book?

 
Old October 27th, 2004, 04:31 PM
Authorized User
 
Join Date: Oct 2004
Location: Denver, CO, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I found an answer to my second question on the book's errata page here...
http://www.wrox.com/WileyCDA/WroxTit...ew_errata.html

It's the second topic. Seems that register_globals is off by default on OS X. After looking around it seems it might be best to leave it that way for security reasons?

Well, it was nice having a conversation with myself. Hope this is of use to someone else!

Cheers!




Similar Threads
Thread Thread Starter Forum Replies Last Post
GET & POST Sheraz Khan Classic ASP Basics 2 May 23rd, 2007 11:44 AM
POST method not working ganesh15 Beginning PHP 2 February 18th, 2006 08:35 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM
stored proc working local and not remote jazzlover2002 SQL Server 2000 3 October 25th, 2003 02:02 PM
POST method not working in LINUX Server , but work cnilashis Beginning PHP 2 August 19th, 2003 08:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.