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 December 2nd, 2004, 12:41 AM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Example not working

I am new to php and can't get an example from the book to work. You have to write two different pages of code. One html and one php. When I run the HTML code and I enter in my information and submit it, it doesn't show up on my screen but you can see it as the query string above on the url. I pasted the code below for both pages. Any help of why this is happening would be great. THANKS!
CKucler
HTML Code
<html>
<body>
<form method=post action="textarea.php">
What are your favorite web sites?
<textarea name="Websites" Cols="50" Rows="5">
http://
http://
http://
http://
</textarea>
<br>
<br>
<input type=submit>
</form>
</body>
</html>

PHP Code
<html>
<body>
<?php
echo $Websites;
?>

</body>
</html>
 
Old December 7th, 2004, 03:35 PM
Authorized User
 
Join Date: Dec 2004
Location: Tunkhannock, PA, USA.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to peg110
Default

Your REGISTER_GLOBALS setting in the PHP.INI file is probably set to OFF. If this is the case (which is actually a good thing as far as security is concerned), then you need to use the SUPER GLOBALS to access the POSTed or GET variables.
Please refer to http://www.php.net/manual/en/languag...predefined.php

in either case you should be able to change your PHP ECHO Code to the following

  echo $_POST['Websites'];


Paul Gardner
------------------
PHP-LIVE help
Via Web @ http://www.mnetweb.co.uk/irc
Via IRC Client pgardner.net:6667
room #PHP
 
Old December 8th, 2004, 11:21 AM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Paul for getting back to me. I did set my globals to "On" but that didn't change anything. I will try your echo command. Thanks for your help!
Courtney

 
Old December 8th, 2004, 11:26 AM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just did the $_POST['Website'}; and that didn't work either???






Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener working .... not working alyeng2000 Javascript How-To 5 January 5th, 2007 08:05 AM
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Why isn't this working? interrupt Javascript How-To 2 January 6th, 2006 03:52 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM
Get Working Copy... not working Enkiel Classic ASP Basics 0 April 21st, 2004 01:41 PM





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