#1
|
||
|
un-required? phMailer
Thanks for the awesome script.
Im looking to change the name, email and message parts so that they are NOT required fields. Some help changing this option please?! |
#2
|
||
|
Open up phMailer.php in an editor, such as notepad.
(note -this is based on my copy that I just downloaded) To disable the requirement for name: look for Code:
If(trim($yourname)=="") { $error.="You did not enter your name!<br />"; } Code:
/* If(trim($yourname)=="") { $error.="You did not enter your name!<br />"; } */ For email: Code:
If(trim($youremail)=="") { $error.="You did not enter your email!<br />"; } Elseif(!eregi("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}\$",$youremail)) { $error.="Invalid email address.<br />"; } Code:
/* If(trim($youremail)=="") { $error.="You did not enter your email!<br />"; } Elseif(!eregi("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}\$",$youremail)) { $error.="Invalid email address.<br />"; } */ For message: Code:
If(trim($yourmessage)=="") { $error.="You did not enter a message!<br />"; } Code:
/* If(trim($yourmessage)=="") { $error.="You did not enter a message!<br />"; } */ you don't have to do the replacement part if you are comfortable just commenting it out. If you look at the replacement code all we are doing is adding a /* at the of the code, and a */ at the end, or instead of replacing you could just delete the code - I prefer commenting it out though so that it can easily be undone IcI |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
'Invisibilty' Volunteers Required... | MERMITE | General Chat | 5 | 11-02-2010 03:18 PM |
gaming program(NO CODING REQUIRED) | --BulletMagnet-- | Web design and Programming | 3 | 02-04-2006 02:05 PM |
SOS:ARMED AMAZONS: CO REQUIRED!!!!!! | Sharon | Gaming Talk | 0 | 04-26-2004 05:23 PM |
error message, “A required .DLL, DINPUT8.DLL, was not found.” | Steve | Delta Force | 0 | 01-08-2004 08:25 PM |
Required for hosting? | WhiteMike | Delta Force | 5 | 05-20-2003 05:00 PM |