Reply to Re: Validating and Passing form data to Thanks Page

Your name:

Reply:


Posted by mismacku on 02/14/06 09:36

I'm also a supreme newb so beware.

print "You entered email as $_POST ['email']\n" ; doesn't work because
you POSTed to "feedback.php" not to your thanks page. My newbie fix
would be to modify the last few lines of feedback.php like this:

----------SNIPPET-------------
$email = rawurlencode($email);
header( "Location: $thankyouurl?email=$email" );
exit ;
----------END SNIPPET-------------

Then modify your thanks page like this:
<?
$email = rawurldecode($_GET['email']);
print "You entered email as $email\n";
?>

Second question:
It looks like feedback.php already verifies that the user entered
something (not necessarily an email address) in the email field.

----------SNIPPET-------------
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
----------END SNIPPET-------------

Again, I'm a newb so use at your own risk.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация