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]
|