# RE: Jubba "PHP Mail Form"

**URL:** https://forum.kirupa.com/t/re-jubba-php-mail-form/30681
**Category:** programming
**Created:** [September 12, 2003, 6:59am UTC](https://forum.kirupa.com/t/re-jubba-php-mail-form/30681 "2003-09-12T06:59:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xzyfer](https://avatars.discourse-cdn.com/v4/letter/x/ce73a5/32.png) [@xzyfer](https://forum.kirupa.com/u/xzyfer)
#### Post date: [September 12, 2003, 6:59am UTC](https://forum.kirupa.com/t/re-jubba-php-mail-form/30681/1 "2003-09-12T06:59:26Z")

</div>

hey jubba its a nice tutor but i think i have found some problems in your script that should realli be cleaned up to save confusion…  
First…  
_mail ( string to, string subject, string message)._  
this is perfectly right but in you code you have done this…

```php

mail( **$fromEmail** , $Subject, $nMessage."
From: ".$fromName."<".$fromEmail.">");

```

which to me is confusion and i belive it should have been **$toMail** from what i can make of your code…

second…  
with your _if()_,you will generate an error that says that the varible $submit has not been initailized if teh button has not been pressed (whichh it usually isnt the first time you view it) and in some cases may not run the rest of the script…//  
this should probably be replaced with

````php

if (isset($submit)){
..your code here...
}

```php

with this php will assume that the varible will be set later and supress the error..
well i hoped this help and that i havent made an idiot of myself..
````
