Reply to Re: manipulating forms

Your name:

Reply:


Posted by seaside on 12/13/06 02:28

one.1more@gmail.com schrieb:

> Hello,
> Consider the following form
> <form method="get" action="http://domain.com/sample.php">
> Enter first part of your email<input type="text" name="firstpart_email"
> value ="" size="20" />
> <input type="submit" value="submit" />
> </form>
>
> If a user inputs "joe124", what code do i add in order for the form to
> submit "joe123@user.mysite.com"

Leave the form as is and do this in your PHP file:

if ( isset( $_GET['firstpart_email'] )) {
$finalAddress = $_GET['firstpart_email'] . '@user.mysite.com';
} else {
$finalAddress = '-'; // In case no value passed
}

In case you'd like to do all in your form, you need a JavaScript event
Handler.

[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

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