# Please expand script

**URL:** https://forum.kirupa.com/t/please-expand-script/86920
**Category:** Uncategorized
**Created:** [April 16, 2005, 7:21pm UTC](https://forum.kirupa.com/t/please-expand-script/86920 "2005-04-16T19:21:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sebjo](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sebjo](https://forum.kirupa.com/u/sebjo)
#### Post date: [April 16, 2005, 7:21pm UTC](https://forum.kirupa.com/t/please-expand-script/86920/1 "2005-04-16T19:21:46Z")

</div>

Hi

I have a PHP form mailer on my site consisting of three txt boxes:  
NAME  
EMAIL  
MESSAGE

Everything works fine if the user fills out all boxes, however if the EMAIL field is left blank then the message is not sent.  
Heres my PHP script:  
\<?PHP  
$to = “myEmailaddressHere”;  
$msg = "$name

";  
$msg .= "$message

";  
mail($to, $msg, "From: My web site  
Reply-To: $email  
");  
?\>

The fla is set up that once the user clicks on the SEND button the playhead is sent to another frame which shows a ‘message sent’ notice.  
So I need to know the simplest way to make sure the user enters his email address (showing an error indicating that he has not filled out all fields) or that the message is sent even if no email address has been entered.

PLEASSSSSE HELP

Seb
