Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 27th, 2004, 03: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!
Reply With Quote
  #2 (permalink)  
Old October 27th, 2004, 04: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?

Reply With Quote
  #3 (permalink)  
Old October 27th, 2004, 05: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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
GET & POST Sheraz Khan Classic ASP Basics 2 May 23rd, 2007 12:44 PM
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 03:02 PM
POST method not working in LINUX Server , but work cnilashis Beginning PHP 2 August 19th, 2003 09:13 AM



All times are GMT -4. The time now is 10:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.