473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

manipulating forms

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 "jo****@user.mysite.com"
I posted this problem in alt.html, but i was told i would get a better
off posting it in a php group.

Dec 13 '06 #1
2 1123

on*******@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 "jo****@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.

Dec 13 '06 #2
thank you. It works.
seaside wrote:
on*******@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 "jo****@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.
Dec 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Richard Trahan | last post by:
I have a form larger than a screen. When some radio buttons or checkboxes are clicked, I need to change the contents of a select (menu) box by rebuilding the select node. That method is necessary...
2
by: jingalls | last post by:
I'm trying to modify a form so that when a user clicks a checkbox for a shorter version of the form, it will replace swap the default (long) form elements with the short version of elements, so...
2
by: shahla.saeed | last post by:
wat i want is to insert the calculated values(simple addition or subtraction) in fields of my table by using expression builders in my forms..i have made that feild in the table but still it...
1
by: Barb Alderton | last post by:
I am working with SharePoint 2003. I am using an existing webpart as a child control (server control). I need to access/manipulate the HTML that the control outputs prior to rendering it to the...
6
by: Michael Sherwood | last post by:
I want to use VB .NET to fill in forms and submit a response to a remote Web server which uses Javascript and .asp. It seems to me that I need some type of Java interpreter within my VB code...
3
by: Henry Wu | last post by:
Hi, I have a MDIForm with a menu name mnuVideo that opens a childForm. My question is a newbie question, I was wondering how can I manipulate the mnuVideo that is in the MDIForm from the...
9
by: Serg | last post by:
I have a form with a text input field Is it possible to specify NO border on that field? Obviosuly I tried border="0" but to no avail. Thanks ahead,
9
by: xiaowei | last post by:
Hi all, I am really new to the use of Access, or rather, the work dealing with codes and applications. Now I am working with this huge Access 2003 database. How can I possibly create some...
17
beacon
by: beacon | last post by:
Hi everybody, I'm working with data to determine if records were completed in a given timeframe. I'm trying to figure out how I can assess records with the same ID, but have different data in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.