# Contact Form with user id instead of email address?

**URL:** <https://forum.kirupa.com/t/contact-form-with-user-id-instead-of-email-address/181861>\
**Category:** programming\
**Created:** [March 13, 2006, 8:03pm UTC](https://forum.kirupa.com/t/contact-form-with-user-id-instead-of-email-address/181861 "2006-03-13T20:03:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [March 13, 2006, 8:03pm UTC](https://forum.kirupa.com/t/contact-form-with-user-id-instead-of-email-address/181861/1 "2006-03-13T20:03:15Z")

</div>

Hello again,

I’m trying to build a contact form and instead of entering email address, i want the user to enter its user id and I will include the @domain.com on actionscript on the form and on its php.

Something like this:  
User id:[COLOR=blue]"\_\_\_\_\_\_\_\_"[/COLOR] ([COLOR=blue]enter by user[/COLOR]) [COLOR=black]@ [domain.com](http://domain.com) (@domain.com will be already on the form)[/COLOR]

so all the user has to do is enter its user id.  
this user id will pick up the rest which will be the @domain.com and that would be an email send.

Has anyone done that before?.. any help please!

ActionScript Code:  
[FONT=Courier New][LEFT]\</p\>  
\<p\>on COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\>&nbsp;\</p\>  
\<p\> [COLOR=#0000ff]if[/COLOR] [COLOR=#000000]([/COLOR]!Email.[COLOR=#0000ff]length[/COLOR] || Email.[COLOR=#0000ff]indexOf[/COLOR]COLOR=#000000[/COLOR] == -[COLOR=#000080]1[/COLOR] || Email.[COLOR=#0000ff]indexOf[/COLOR]COLOR=#000000[/COLOR] == -[COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> EmailStatus = [COLOR=#ff0000]“Please enter a valid COMPANY E-mail address”[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR] \</p\>  
\<p\> [COLOR=#0000ff]else[/COLOR] [COLOR=#0000ff]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> EmailStatus = [COLOR=#ff0000]“Please enter your message”[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR] \</p\>  
\<p\>&nbsp;\</p\>  
\<p\> [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]loadVariablesNum[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#ff0000]“MailPHP.php”[/COLOR], [COLOR=#ff0000]“0”[/COLOR], [COLOR=#ff0000]“Post”[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\> [COLOR=#0000ff]gotoAndPlay[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>  
[/LEFT]  
[/FONT]

and this is what i have on my php file

```php

<?
$ToEmail = "email@domain.com";
$ToSubject = "Training Orientation Feedback";
$EmailBody = "Sent By: $FirstName
Senders Email: $Email

Message Sent:
$ToComments
";
mail($ToName." <".$ToEmail.">",$ToSubject, $EmailBody, "From: ".$FirstName." <".$Email.">");
?>

```

the input text for the user id or email in this case is variable = Email

please help!

thanks.
