Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 17th, 2004, 09:53 PM
Registered User
Join Date: Nov 2004
Location: Malappuram, Kerala, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aboo Send a message via Yahoo to aboo
Default Help on sending data between forms

We can use GET or POST to transfer data between PHP files. But, as per the text "Beginning PHP4, we can access the variables passed just by calling as follows.

     Form1 :

                In a form $Author has a value and we use GET method to submit it.

             In the receiving form I tried to access the variable but it says : Author undeclared. I checked the Case. It is correct. And the URL is having the variable included. But no result.

         It works when I access the variable as follows:


Please help
Reply With Quote
  #2 (permalink)  
Old December 7th, 2004, 03:47 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

First of all the reason it's undeclared, is, I suspect you are posting to the $PHP_SELF thus the first time you get to the page no value is passed and thus the variable is Undeclared (until it actually contains data)

You can control this by adjusting level of error reporting. You can either change that in the PHP.INI or you can suppress the error a couple of ways. You can change

$_GET['Author'] to @$_GET['Author']

or you can use many functions to check the variable such as the isset() or emtpy() function.

These will prevent the throwing of an error (I believe that they are only NOTICE type errors too.)

Hope this helps

Paul Gardner
Via Web @ http://www.mnetweb.co.uk/irc
Via IRC Client pgardner.net:6667
room #PHP
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
problem in e-mail structure sending data from data tiawebchd General .NET 3 May 5th, 2008 08:07 AM
Sending info to HTML forms.... Sildaekar C++ Programming 0 April 2nd, 2007 01:24 PM
Sending data between 2 computers u3 Pro PHP 3 September 15th, 2005 07:34 PM
Sending data to next page (C#) shazia1 VS.NET 2002/2003 2 June 30th, 2005 03:24 AM
Sending data to next page (C#) shazia1 VS.NET 2002/2003 1 June 29th, 2005 09:45 PM

All times are GMT -4. The time now is 11:12 PM.

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