PHP Form Online Generator

Hello,

I recently searched for a PHP form creator and came across what appeared to be a free PHP online form creator at http://www.freeformmaker.com. I absolutely no nothing about PHP coding, but I am a web developer (designer). Well, I proceeded to make the form online, downloaded the php file, uploaded it to one of my websites. When filling out the custom created form online, it worked fine. No problems. The information was sent to my email correctly.

My concerns are:

  1. Is this a secure solution?

  2. The ADMIN email in line 3 of the code is not mine and is automatically set in the code.

  3. I don’t know if the person at http://www.freeformmaker.com in the code, and of linux support.

I think its kind of suspect to offer this brilliant solution for FREE with no strings attached, and there is no documentation on the website as to the usage of the generator.

Is there an alternative I can do instead of placing his email in the code? or is there another method of getting code in this manner, being that I am a designer and have no knowledge of pho - yet!

I know I am asking a lot, but I really need help with this stuff, you can’t trust everything these days.

My custom code is processed below. Note: There are mentions in the (templated) code of many elements that may, or may not be used in the custom form. I just need it to process regular contact forms, not for other reasons like processing credit cards, etc, as it refers to.

[php]<?php
error_reporting(E_PARSE);
define(“ADMIN_MAIL”, "[email protected]");
define(“HOST_NAME”, $_SERVER[‘HTTP_HOST’]);
define(“PHP_SELF”, $SERVER[‘PHP_SELF’]);
define(“ERR_MISSING”, "Missing required field : ");
define(“ERR_EMAIL”, "Please enter a valid e-mail address : ");
define(“ERR_CREDIT_CARD_NUMBER”, "Please check the credit card number : ");
define(“ERR_CREDIT_CARD_EXPIRED”, "Please check the credit card expiry date : ");
define(“ERR_SELECT_UPLOAD”, "Please select file : ");// recipient
define(‘FORM_RECIPIENT’, [email protected]’);
// — Array of Form Elements —
$form_mail[] = array( “name” => “Full_Name”, “text” => “Full Name”, “type” => “text”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Address”, “text” => “Address”, “type” => “text”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Address_2”, “text” => “Address 2”, “type” => “text”, “required” => “” ) ;
$form_mail[] = array( “name” => “City”, “text” => “City”, “type” => “text”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “State”, “text” => “State”, “type” => “text”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Zip”, “text” => “Zip”, “type” => “text”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Phone”, “text” => “Phone”, “type” => “text”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Email”, “text” => “Email”, “type” => “email”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Estimated_Investment_Limit”, “text” => “Estimated Investment Limit”, “type” => “select”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “I_am_interested_in”, “text” => “I am interested in”, “type” => “select”, “required” => “Required” ) ;
$form_mail[] = array( “name” => “Please_send_me_a_brochure_by_mail”, “text” => “Please send me a brochure by mail”, “type” => “checkbox”, “required” => “” ) ;
$form_mail[] = array( “name” => “Reference”, “text” => “How did you hear about us?”, “type” => “select”, “required” => “” ) ;
$form_mail[] = array( “name” => "Property_Images
(10MB_limit)", “text” => “Property Images (10MB limit)”, “type” => “attachment”, “required” => “” ) ;
$form_mail[] = array( “name” => “Additional_Comments”, “text” => "Additional Comments ", “type” => “textarea”, “required” => “” ) ;

// – Create new vars for checkPass() & sendFormMail() –
$Please_send_me_a_brochure_by_mail = array();
$Please_send_me_a_brochure_by_mail[0]=$HTTP_POST_VARS[ “Checkbox01_Please_send_me_a_brochure_by_mail”];
$HTTP_POST_VARS[ “Please_send_me_a_brochure_by_mail” ] = join( “n”, $Please_send_me_a_brochure_by_mail);

// – Detech Submit & SendMail –
$isHideForm = false;
if( $HTTP_POST_VARS[“formmail_submit”] ){
$sErr = checkPass();
if( ! $sErr ){
sendFormMail( $form_mail, “form”) ;
$isHideForm = true;

  $redirect = ""; 
  if( strlen(trim($redirect)) ): 
     header( "Location:$redirect" ); 
     exit; 
  endif; 

}
}

?>

<? // =============================================== function sendFormMail( $form_mail, $sFileName = "" ) { global $HTTP_POST_VARS ; if (ereg('/freeformmaker.com/', HOST_NAME)) { return; } $to = FORM_RECIPIENT; $from = "NO_REPLY@" . HOST_NAME; $subject = $HTTP_POST_VARS["esh_formmail_subject"]; // first stage keep it simple: $sWhatToDo = $sFileName ? "mailandfile" : "" ; //$HTTP_POST_VARS["esh_formmail_mail_and_file"]; //$sFileName = $HTTP_POST_VARS["esh_formmail_save_record_file"]; $cc = $HTTP_POST_VARS["esh_formmail_cc"]; $bcc = $HTTP_POST_VARS["esh_formmail_bcc"]; $charset = $HTTP_POST_VARS["esh_formmail_charset"]; for( $i = 0; $i < count( $form_mail ); $i ++ ){ $value = trim( $HTTP_POST_VARS[ $form_mail[ $i ][ "name" ] ] ); $content .= $form_mail[ $i ][ "text" ] . " t : " . $value ."n"; $line .= remove_newline( $value ) . "t" ; if( strtolower("Sender's email") == strtolower($form_mail[ $i ][ "type" ]) ) { //print "Type:[" . $form_mail[ $i ][ "type" ] . "] $value
n"; $from = $value ; } }; $content .= "nnIP:" . getEnv( "REMOTE_ADDR" ); switch( strtolower($sWhatToDo) ){ case "mailandfile" : mailAttachments( $to , $subject , $content, $from, $charset, $cc , $bcc ) ; if( ! appendToFile( $sFileName, $line ) ) mailReport( $content . "nnWrite Form Mail to File Fail." ); break; case "fileonly" : if( ! appendToFile( $sFileName, $line ) ) mailReport( $content . "nnWrite Form Mail to File Fail.", $from ); break; default : mailAttachments( $to , $subject , $content, $from, $charset, $cc , $bcc ) ; } mailAutoResponse( $from ) ; } //------------------------------------------------------------------------------------------ function mailAutoResponse( $to ){ global $HTTP_POST_VARS ; $subject = $HTTP_POST_VARS["esh_formmail_return_subject"]; $responseMsg = $HTTP_POST_VARS["esh_formmail_return_msg"]; if( $to && $responseMsg ) mail( $to, $subject, $responseMsg, "From: " . FORM_RECIPIENT); } //------------------------------------------------------------------------------------------ function mailReport( $content = "", $from = "" ){ mail( ADMIN_MAIL, "Error@" . HOST_NAME . PHP_SELF, $content, "From:$from" ); } //------------------------------------------------------------------------------------------ function remove_newline( $str = "" ){ $newliner = "" ; // replace rn with $newliner ; $newtaber = "" ; // replace t with $newtaber ; $str = ereg_replace( "t", $newtaber, $str ); $str = ereg_replace( "rn", $newliner, $str ); return ereg_replace( "n", $newliner, $str ); } //------------------------------------------------------------------------------------------ function checkPass() { global $form_mail ; global $HTTP_POST_VARS ; global $HTTP_POST_FILES ; for( $i = 0; $i < count( $form_mail ); $i ++ ){ $type = strtolower( $form_mail[ $i ][ "type" ] ); $value = trim( $HTTP_POST_VARS[ $form_mail[ $i ][ "name" ] ] ); $required = $form_mail[ $i ][ "required" ] ; $text = stripslashes( $form_mail[ $i ][ "text" ] ); // simple check the field has something keyed in. if( !strlen($value) && ( $required == "Required" ) && $type != "attachment" ) return ERR_MISSING . $text ; // verify the special case if( ( strlen($value) || $type == "attachment" ) && $required == "Required" ): switch( $type ){ case strtolower("Sender's Name") : break; case strtolower("Generic email"): case strtolower("Sender's email"): if( ! formIsEMail($value) ) return ERR_EMAIL . $text ; break; case "text" : break; case "textarea" : break; case "checkbox" : case "radio" : break; case "select" : break; case "attachment" : $upload_file = $HTTP_POST_FILES[ $form_mail[ $i ]["name"] ][ "tmp_name" ] ; if( ! is_uploaded_file($upload_file) ) return ERR_SELECT_UPLOAD . $text; break; case strtolower("Date(MM-DD-YYYY)"): break; case strtolower("Date(MM-YYYY)"): break; case strtolower("CreditCard(MM-YYYY)"): if( $value < date("Y-m") ) return ERR_CREDIT_CARD_EXPIRED . $text; break; case strtolower("CreditCard#"): if( !formIsCreditNumber( $value ) ) return ERR_CREDIT_CARD_NUMBER . $text ; break; case strtolower("Time(HH:MM:SS)"): break; case strtolower("Time(HH:MM)"): break; default : //return $sErrRequired . $form_mail[ $i ][ "text" ]; } // switch endif; } // for return "" ; } //------------------------------------------------------------------------------------------ function formSelected( $var, $val ) { echo ( $var == $val ) ? "selected" : ""; } //------------------------------------------------------------------------------------------ function formChecked( $var, $val ) { echo ( $var == $val ) ? "checked" : ""; } //------------------------------------------------------------------------------------------ function formIsEMail( $email ){ return ereg( "^(.+)@(.+)\.(.+)$", $email ); } //------------------------------------------------------------------------------------------ function selectList( $name, $selectedValue, $start, $end, $prompt = "-Select-", $style = "" ) { $tab = "t" ; print "n" ; print $tab . "$promptn" ; $nLen = strlen( "$end" ) ; $prefix_zero = str_repeat( "0", $nLen ); for( $i = $start; $i <= $end ; $i ++ ){ $stri = substr( $prefix_zero . $i, strlen($prefix_zero . $i)-$nLen, $nLen ); $selected = ( $stri == $selectedValue ) ? " selected " : "" ; print $tab . "$strin" ; } print "nn" ; } //------------------------------------------------------------------------------------------ // something like CreditCard.pm in perl CPAN function formIsCreditNumber( $number ) { $tmp = $number; $number = preg_replace( "/[^0-9]/", "", $tmp ); if ( preg_match( "/[^ds]/", $number ) ) return 0; if ( strlen($number) < 13 && 0+$number ) return 0; for ($i = 0; $i < strlen($number) - 1; $i++) { $weight = substr($number, -1 * ($i + 2), 1) * (2 - ($i % 2)); $sum += (($weight < 10) ? $weight : ($weight - 9)); } if ( substr($number, -1) == (10 - $sum % 10) % 10 ) return $number; return $number; } // -------------------------- Begin Mail Attachment Functions ----------------------------------------------------------------- function mailAttachments( $to = "" , $subject = "" , $message = "" , $from = "[email protected]" , $charset = "iso-8859-1", $cc = "" , $bcc = "" ){ global $HTTP_POST_FILES ; if( ! strlen( trim( $to ) ) ) return "Missing "To" Field." ; $boundary = "====_My_PHP_Form_Generator_" . md5( uniqid( srand( time() ) ) ) . "===="; // setup mail header infomation $headers = "From: $fromrn"; if ($cc) $headers .= "CC: $ccrn"; if ($bcc) $headers .= "BCC: $bccrn"; $plainHeaders = $headers ; // for no attachments header $headers .= "MIME-Version: 1.0nContent-type: multipart/mixed;ntboundary="$boundary"n"; $txtMsg = "nThis is a multi-part message in MIME format.n" . "n--$boundaryn" . "Content-Type: text/plain;ntcharset="$charset"nn" . $message . "n"; //create mulitipart attachments boundary $sError = "" ; $nFound = 0; foreach( $HTTP_POST_FILES as $aFile ){ $sFileName = $aFile[ "tmp_name" ] ; $sFileRealName = $aFile[ "name" ] ; if( is_file( $sFileName ) ): if( $fp = fopen( $sFileName, "rb" ) ) : $sContent = fread( $fp, filesize( $sFileName ) ); $sFName = basename( $sFileRealName ) ; $sMIME = getMIMEType( $sFName ) ; $bPlainText = ( $sMIME == "text/plain" ) ; if( $bPlainText ) : $encoding = "" ; else: $encoding = "Content-Transfer-Encoding: base64n"; $sContent = chunk_split( base64_encode( $sContent ) ); endif; $sEncodeBody .= "n--$boundaryn" . "Content-Type: $sMIME;n" . "tname="$sFName"n" . $encoding . "Content-Disposition: attachment;n" . "tfilename="$sFName"nn" . $sContent . "n" ; $nFound ++; else: $sError .= "
File $sFileName can not open.n" ; endif; // if( $fp = fopen( $sFileName, "rb" ) ) : else: $sError .= "
File $sFileName doesn't exist.n" ; endif; //if( file_exists( $sFileName ) ): }; // end foreach $sEncodeBody .= "nn--$boundary--" ; $sSource = $txtMsg . $sEncodeBody ; $nFound ? mail( $to, $subject, $sSource, $headers ) : mail( $to, $subject, $message, $plainHeaders ); return $sError ; } /* --------------------------------------------------------------------------------------------------- Parameters: $sFileName Return : 1. "" : no extendsion name, or sFileName is empty 2. string: MIME Type name of array aMimeType's definition. ---------------------------------------------------------------------------------------------------*/ function getMIMEType( $sFileName = "" ) { $sFileName = strtolower( trim( $sFileName ) ); if( ! strlen( $sFileName ) ) return ""; $aMimeType = array( "txt" => "text/plain" , "pdf" => "application/pdf" , "zip" => "application/x-compressed" , "html" => "text/html" , "htm" => "text/html" , "avi" => "video/avi" , "mpg" => "video/mpeg " , "wav" => "audio/wav" , "jpg" => "image/jpeg " , "gif" => "image/gif" , "tif" => "image/tiff " , "png" => "image/x-png" , "bmp" => "image/bmp" ); $aFile = split( ".", basename( $sFileName ) ) ; $nDiminson = count( $aFile ) ; $sExt = $aFile[ $nDiminson - 1 ] ; // get last part: like ".tar.zip", return "zip" return ( $nDiminson > 1 ) ? $aMimeType[ $sExt ] : ""; } // End Mail Attachment Functions //------------------------------------------------------------------------------------------ function appendToFile( $sFileName = "", $line = "" ){ if( !$sFileName || !$line ) return 0; $hFile = fopen( "$sFileName", "a+w" ); $nBytes = 0; if( $hFile ){ $nBytes = fputs( $hFile , trim($line)."rn" ); fclose( $hFile ); }; return $nBytes ; } ?> [/php]

Any help would be greatly appreciated. Thanks a bunch!

Have you tried just changing:
define(“ADMIN_MAIL”, "[email protected]");

to something like

define(“ADMIN_MAIL”, "[email protected]");

[email protected] - actually being your email address of course.

In short, yes… but it doesn’t work after I do that. I actually do get an error message in the email sent to me, the “Recipient” that reads:

Write Form Mail to File Fail.

That email is automated and sent from the email “Nobody” @ “mydomain.com

Mydomain, being the actual domain used to try and process the form, which in this case was changed from the ADMIN’s email on line 3, to my email like you mentioned in your response.

[b]So I would assume that the information is sent to the ADMIN to process…? which would be processed via servers? …or does the PHP form process the information directly in the code?

Also, the information in the “sendFormMail” section of the code has something to do with the processing, right? [/b]

[php]

<? // =============================================== function sendFormMail( $form_mail, $sFileName = "" ) { global $HTTP_POST_VARS ; if (ereg('/freeformmaker.com/', HOST_NAME)) { return; } $to = FORM_RECIPIENT; $from = "NO_REPLY@" . HOST_NAME; $subject = $HTTP_POST_VARS["esh_formmail_subject"]; // first stage keep it simple: $sWhatToDo = $sFileName ? "mailandfile" : "" ; //$HTTP_POST_VARS["esh_formmail_mail_and_file"]; //$sFileName = $HTTP_POST_VARS["esh_formmail_save_record_file"]; $cc = $HTTP_POST_VARS["esh_formmail_cc"]; $bcc = $HTTP_POST_VARS["esh_formmail_bcc"]; $charset = $HTTP_POST_VARS["esh_formmail_charset"]; for( $i = 0; $i < count( $form_mail ); $i ++ ){ $value = trim( $HTTP_POST_VARS[ $form_mail[ $i ][ "name" ] ] ); $content .= $form_mail[ $i ][ "text" ] . " t : " . $value ."n"; $line .= remove_newline( $value ) . "t" ; if( strtolower("Sender's email") == strtolower($form_mail[ $i ][ "type" ]) ) { //print "Type:[" . $form_mail[ $i ][ "type" ] . "] $value
n"; $from = $value ; } }; $content .= "nnIP:" . getEnv( "REMOTE_ADDR" ); switch( strtolower($sWhatToDo) ){ case "mailandfile" : mailAttachments( $to , $subject , $content, $from, $charset, $cc , $bcc ) ; if( ! appendToFile( $sFileName, $line ) ) mailReport( $content . "nnWrite Form Mail to File Fail." ); break; case "fileonly" : if( ! appendToFile( $sFileName, $line ) ) mailReport( $content . "nnWrite Form Mail to File Fail.", $from ); break; default : mailAttachments( $to , $subject , $content, $from, $charset, $cc , $bcc ) ; } mailAutoResponse( $from ) ; } [/php] Again, I have no real understanding of this stuff, but one thing I do know is that the form works perfectly when I submit information. It comes right to my email, just the way I filled it out. I have tried emailing the contact person on the website as well as the ADMIN in the code with simple requests to explain the usage policy of the code as well as security, but to no luck... neither have replied yet. In a perfect world, I just want to process regular php contact forms that I can easily customize without spending much of my time getting deep into the books... of course if possible.

i think u picked a to complex (seems u don’t need to send attachments) and to old script (the $HTTP_… vars are dericiated since php4)

if u just wanna send a form, as easy as posible u may use something like this:

[php]$message=’’;
foreach($_POST as $name => $value)
$message.=$name.": t".$value.“n”;

if(isset($_POST[‘email’]))
$header='From: '.$_POST[‘email’];
else
$header='From: ‘[email protected]’,‘my contact form’,$message,$header))
echo ‘thanks’;
[/php]

Will this code process everything in the form?
…and is this code supposed to replace all the code completely? Basically, where do I place this… at the top of the form page, or the processing page where all the code is located?

My contact form is located at http://www.trycreativesolutions.com/contact.php

…so you can get a feel for what I want in the form.

Please let me know in steps - if you could - because I don’t know too much about this. Your patience and support are appreciated. Thanks!

I don’t know if this may help, but here is what the form looks like in the code view:

[php]

<?php if( !$isHideForm ): global $sErr ; if( $sErr ) print "
$sErr
"; $starColor = $sErr ? "#ff0000" : "#000000"; $style=" class='form_text' "; ?> Full Name * " class='text_box'>
<tr>
	<td class="form_field" valign='top' align='right'>Title </td><td width='10'  aligh='right' valign='top'></td>
	<td class="form_text">

<input type=“text” name=“Title” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Title" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>Company </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<input type=“text” name=“Company” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Company" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>Address </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<input type=“text” name=“Address” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Address" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>City </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<input type=“text” name=“City” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "City" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>State </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<select name=“State” <? print $style; ?>>

- Select - > Alabama > Alaska > Arizon > Arkansas > California > Colorado > Connecticut > Delaware > District of Columbia > Florida > Georgia > Hawaii > Idaho > Illinois > Indiana > Iowa > Kansas > Kentucky > Louisiana > Maine > Maryland > Massachusetts > Michigan > Minnesota > Mississippi > Missouri > Montana > Nebraska > Nevada > New Hampshire > New Jersey > New Mexico > New York > North Carolina > North Dakota > Ohio > Oklahoma > Oregon > Pennsylvania > Rhode Island > South Carolina > South Dakota > Tennessee > Texas > Utah > Vermont > Virginia > Washington > WestVirginia > Wisconsin > Wyoming
<tr>
	<td class="form_field" valign='top' align='right'>Zip </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<input type=“text” name=“Zip” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Zip" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>Website Address </td><td width='10'  aligh='right' valign='top'></td>
	<td class="form_text">

<input type=“text” name=“Website_Address” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Website_Address" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>Contact Email </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<input type=“email” name=“Contact_Email” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Contact_Email" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>Request For Quote </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">

<input type=“checkbox” name=“Checkbox01_Request_For_Quote” value=“Website Services” <?php formChecked( $HTTP_POST_VARS[ "Checkbox01_Request_For_Quote" ], "Website Services" ); ?> > Website Services

<input type=“checkbox” name=“Checkbox02_Request_For_Quote” value=“Design Services” <?php formChecked( $HTTP_POST_VARS[ "Checkbox02_Request_For_Quote" ], "Design Services" ); ?> > Design Services

<input type=“checkbox” name=“Checkbox03_Request_For_Quote” value=“Print Services” <?php formChecked( $HTTP_POST_VARS[ "Checkbox03_Request_For_Quote" ], "Print Services" ); ?> > Print Services

<input type=“checkbox” name=“Checkbox04_Request_For_Quote” value=“Internet Solutions” <?php formChecked( $HTTP_POST_VARS[ "Checkbox04_Request_For_Quote" ], "Internet Solutions" ); ?> > Internet Solutions

<input type=“checkbox” name=“Checkbox05_Request_For_Quote” value=“Hosting/Domain Services” <?php formChecked( $HTTP_POST_VARS[ "Checkbox05_Request_For_Quote" ], "Hosting/Domain Services" ); ?> > Hosting/Domain Services

<input type=“checkbox” name=“Checkbox06_Request_For_Quote” value=“Marketing Services” <?php formChecked( $HTTP_POST_VARS[ "Checkbox06_Request_For_Quote" ], "Marketing Services" ); ?> > Marketing Services

<input type=“checkbox” name=“Checkbox07_Request_For_Quote” value=“None” <?php formChecked( $HTTP_POST_VARS[ "Checkbox07_Request_For_Quote" ], "None" ); ?> > None

<tr>
	<td class="form_field" valign='top' align='right'>Quotation Due Date </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">
<?php selectList( "Quotation_Due_Date_MM", $HTTP_POST_VARS["Quotation_Due_Date_MM"], 1, 12, "MM", $style ) ; selectList( "Quotation_Due_Date_DD", $HTTP_POST_VARS["Quotation_Due_Date_DD"], 1, 31, "DD", $style ) ; selectList( "Quotation_Due_Date_YYYY", $HTTP_POST_VARS["Quotation_Due_Date_YYYY"], date("Y"), date("Y")+3, "YYYY", $style ) ; ?>
</tr>

<tr>
	<td class="form_field" valign='top' align='right'>Project Deadline </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
	<td class="form_text">
<?php selectList( "Project_Deadline_MM", $HTTP_POST_VARS["Project_Deadline_MM"], 1, 12, "MM", $style ) ; selectList( "Project_Deadline_DD", $HTTP_POST_VARS["Project_Deadline_DD"], 1, 31, "DD", $style ) ; selectList( "Project_Deadline_YYYY", $HTTP_POST_VARS["Project_Deadline_YYYY"], date("Y"), date("Y")+3, "YYYY", $style ) ; ?>
</tr>

<tr>
	<td class="form_field" valign='top' align='right'>Send Attachment </td><td width='10'  aligh='right' valign='top'></td>
	<td class="form_text">


<tr>
	<td class="form_field" valign='top' align='right'>Referred By </td><td width='10'  aligh='right' valign='top'></td>
	<td class="form_text">

<input type=“text” name=“Referred_By” value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Referred_By" ] ); ?>" class=‘text_box’>

<tr>
	<td class="form_field" valign='top' align='right'>Questions/Comments </td><td width='10'  aligh='right' valign='top'></td>
	<td class="form_text">

<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Questions_Comments" ] ); ?>

<tr><td colspan=3 align='center'><input type='submit' value='Submit'> &nbsp;&nbsp; <input type='button' value='Cancel' onClick="location.href='/';"></td></tr>
<?php if( $sErr ) print "";;; else: //!$isHideForm print( "


Your form has been sent. Thank you.



" ); endif; //!$isHideForm ?>
<!-- footer -->[/php]

sry, i had to go to sleep.

yes and yes

this would be the processing page. of cause u have to extend the ‘thanks’ to a complete html page.

the script i wrote is not doing any validation. but just sending out all data to ur email address.

with ur form u would just have to change $_POST[‘email’] to $_POST[‘Contact_Email’] and put the code surrounded by <?php ?> in a file called the same as the action of the form.

of cause this is not the best way but i’m afraid i can’t write a complete script for u.

Thanks for getting back to me. If at all possible… can you write the code for me that would process these form elements? …to be sent to my email http://www.trycreativesolutions.com/contact.php

It wouldn’t matter the difficulty because I am in the learning phase right now anyway. And as long as it works, then I would just have a blueprint to learn even faster. I would really appreciate the opportunity to learn from a working and secure code, and not the one I’ve been trying to learn from… oh, and outdated according to you! Anything would help right now… :)

If you could… validation for the code would be good… because I have a couple of required fields in there that have to be submitted. Let me know your thoughts.

Sponsor our Newsletter | Privacy Policy | Terms of Service