Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To 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 15th, 2005, 06:31 PM
Registered User
Join Date: Nov 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

I have a form that posts 2 variables. As a test, I can loop the variables and see the names and values (see the last part of this message).

However if I try to set a variable using:

$To = $_Post['OwnerEmail'];

the variable $To is empty

// For example, the 2 lines below produce a blank value

$To = $_Post['OwnerEmail'];
echo "To:". $To;


// The lines below produce the output shown later
while($element = each($_POST))
echo $element['key'];
echo ' - ';
echo $element['value'];
echo "<br>";

// Output from lines above ----------------
// Note that OwnerEmail is a valid element name

//OwnerName - KARL E IN
//OwnerEmail - idnx2785@q2q4.us

How can I get the OwnerEmail value (idnx2785@q2q4.us)into the variable $To ?

Old December 16th, 2005, 03:14 AM
Friend of Wrox
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul

Only glitch (that appeared to me):

$To = $_Post['OwnerEmail']; ?

Use, $To = $_POST['OwnerEmail'];

Students' finances

Similar Threads
Thread Thread Starter Forum Replies Last Post
isset($_POST) summi_beniwal Beginning PHP 1 June 21st, 2008 07:13 AM
Problem using $_POST gkirk Beginning PHP 7 August 30th, 2006 07:21 AM
Chapter 12 - $_POST['redirect'] problem cshu BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 4 July 25th, 2005 08:14 PM
Getting nothing from $_POST['varName']; Kalisan Beginning PHP 10 February 3rd, 2005 02:37 PM
$_POST Problem czambran BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 7 July 7th, 2004 09:20 AM

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