I am getting <br /> in MYSQL database for item_title,item_desc,item_subdesc and not for the mail form, shouldn't be it in this part of the code...
The very first thing that occurs is the variable replace this with that.
Every other function like write to the SQL database will write variables with the  <br/> appended to the end. This is putting some html formatting into the variables for the email message. If you were to save the email as text you would probably see these characters.
If you don't want these characters in the SQL then you must change the preg_replace for all, or create separate preg_replace just for the SQL function.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi forum. Just starting to use phpformgenerator. Seems to be working quite well. I have this problem also. I am not writing this data to a database, only sending an email.
I have a text area and when multiple lines are input, I get an email that looks like this:
CLIENT FULL ADDRESS: addr 1 <br />addr 2 <br />addr 3 <br />addr 4 <br />addr 5
If I follow the instructions from this thread, and changed the phpcode like this:
$CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $CLIENTFULLADDRESS)
to $CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/","", $CLIENTFULLADDRESS)
then this is what I get in my email:
CLIENT FULL ADDRESS: addr 1addr 2addr 3addr 4addr 5
What I would like the email to look like is this:
CLIENT FULL ADDRESS: addr 1
addr 2
addr 3
addr 4
addr 5
or something similiar.
Any help would be greatly appreciated.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is why when you subscribe to any automated email messages they ask if you prefer text or html.
The example you followed assumes html. Your email appears to be expecting text and therefore does not understand the html part (it gets ignored). You can format for text but then if you change your email to expect html you will have similar problems.
Decide who is going to receive the email, then how the email is expected from the email program used, then you can adjust the process.php file to send the right message.
You can send messages that work either way but not unless you want to do the programming yourself.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just to make sure I understand you correctly. My email client (Mozilla Thunderbird) apparently expects to receive TEXT email messages. This is why I see the html code in the email.
If I can configure my email client to accept HTML messages, the emails should display properly with the original code?
$CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $CLIENTFULLADDRESS)
If I keep my email client configuration as is (text) then I would have to edit the original code and format the data properly using php code in the process.php file? (Right now it just concatenates the lines for a text area field.)
Is this correct?
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, by default Both Mozilla Thunderbird and Outlook Express (security hole posing as a email client) expect html messages. So if I have this code in process.php in regards to a text area field:
$CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $CLIENTFULLADDRESS)
the html tags should not display.
However, they do display. (In thunderbird you can easily choose to display messages in Original HTML, Simple HTML, or Plain text.) The default is Original HTML. So if I use the above code, why would I get the following displayed when viewing the message using Original HTML?
CLIENT FULL ADDRESS: add 1 <br />add 2 <br />add 3
(where add 1 is the first line of data)
(where add 2 is the second line of data)
(where add 3 is the third line of data)
If you create a 1 field form with that field being a text area of 3 rows by 30 columns, entered in 3 lines of data and sent it via email, what do you see?
I am not trying to be an ass. I really like the software. I just want to figure out why I am seeing the html tags instead of the tags being interpreted correctly. I want to be part of the solution. I stand ready to do whatever it takes.
Or am I the only one experiencing this result?
Thanks,
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Send me a link to a form1.html file. Email me the process.php file, a bitmap sample of what you see in your email, and a description of what you would like to see instead.
I will analyze the program against your result and tell you what you need to do for any form in the future to produce the desired result.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TNTEverett,
Thank you for your reply.
I sent you an email with all the elements you requested.
Please let me know if you don't get the email.
Thanks.
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whoops,
the message came right back complaining about the size was too large. Sorry for being such a noob, but how do I supply you the requested items and attachments?
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1.) Move the line
$textareabox=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $textareabox);
To the very end of the php section (just above the line containing "?>"). This takes the form data and replaces the text carriage return and line feeds with html equivalent tags. This works perfectly for the Thank You page but screws up your text email.
Moving it to the end allows the email to be processed first before making the substitution for the html thank you page.
2.) I added a line feed to the email message so that line 1 is not a continuation of the text box name label.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you don't mind the effects on email change each line to the following.
$itemtitle=preg_replace("/(\015\012)|(\015)|(\012)/"," ", $itemtitle);pt_register('POST','itemdesc');
$itemdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," ", $itemdesc);pt_register('POST','itemsubdesc');
$itemsubdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," ", $itemsubdesc);pt_register('POST','itemcode');
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another checking question..... can you guide me where I can get information to how I can password protect the form file
What I want to do is
1. Can only sign-in the form with a password
2. The password is either remembered as a cookie or session
3. Once the data is submitted it redirects back to form page
BUT
1. I don't need to enter the password again, till I close the Browser or set a cookie expiration time.
Appreciate all your help and time.
regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is best to do this by password protecting the whole directory. This way no one can access anything in the directory at all without a password.
I do this through my hosts control panel interface. It works very well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All my data goes to an email address from the form. I get this as the message & voice description: [quote]Hello, this is Vicky from Spain. <br />I hope you like my demos
... <br />Castillian-European[/quote]
My code is below - how can I get it so that when they write with paragraphs, it appears with spaces, rather than all one blob with " <br />" inbetween. Thank you all!!!
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Name');
pt_register('POST','Email');
pt_register('POST','Message');
$Message=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Message);pt_register('POST','Voicedescription');
$Voicedescription=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Voicedescription);pt_register('POST','ISDN');
pt_register('POST','Sex');
$Demo1=$HTTP_POST_FILES['Demo1'];
$Demo2=$HTTP_POST_FILES['Demo2'];
$Demo3=$HTTP_POST_FILES['Demo3'];
$Demo4=$HTTP_POST_FILES['Demo4'];
$Demo5=$HTTP_POST_FILES['Demo5'];
if($Name=="" || $Email=="" || $Message=="" || $Sex=="" || $Demo1=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!is_uploaded_file($HTTP_POST_FILES['Demo1']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo1']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo2']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo2']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo2']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo3']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo3']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo3']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo4']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo4']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo4']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo5']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo5']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo5']['name'].", was not uploaded!";
$errors=1;
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo1']['name'];
$image_list[6] = $image_part;
copy($HTTP_POST_FILES['Demo1']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo2']['name'];
$image_list[7] = $image_part;
copy($HTTP_POST_FILES['Demo2']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo3']['name'];
$image_list[8] = $image_part;
copy($HTTP_POST_FILES['Demo3']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo4']['name'];
$image_list[9] = $image_part;
copy($HTTP_POST_FILES['Demo4']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo5']['name'];
$image_list[10] = $image_part;
copy($HTTP_POST_FILES['Demo5']['tmp_name'], "files/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Name: ".$Name."
Email: ".$Email."
Message: ".$Message."
Voice description: ".$Voicedescription."
ISDN: ".$ISDN."
Sex: ".$Sex."
Demo 1: ".$where_form_is."files/".$image_list[6]."
Demo 2: ".$where_form_is."files/".$image_list[7]."
Demo 3: ".$where_form_is."files/".$image_list[8]."
Demo 4: ".$where_form_is."files/".$image_list[9]."
Demo 5: ".$where_form_is."files/".$image_list[10]."
";
$message = stripslashes($message);
mail("sales@airtalentonline.co.uk","Air Talent Online Demo Submit Form",$message,"From: phpFormGenerator");
Find the variables you need to use in your message and change the
=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />",
to
=preg_replace("/(\015\012)|(\015)|(\012)/"," ",
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Even though the process.php code has
$itemtitle=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemtitle);pt_register('POST','itemdesc');
$itemdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemdesc);pt_register('POST','itemsubdesc');
$itemsubdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemsubdesc);pt_register('POST','itemcode');
still the output in SQL database has entries of & <br />.
I am using the form to update my database.
Please suggest
My process.php
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','itemtitle');
$itemtitle=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemtitle);pt_register('POST','itemdesc');
$itemdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemdesc);pt_register('POST','itemsubdesc');
$itemsubdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemsubdesc);pt_register('POST','itemcode');
pt_register('POST','itemexp');
pt_register('POST','itemimage');
pt_register('POST','deptid');
pt_register('POST','merchantid');
pt_register('POST','dealcoupon');
pt_register('POST','couponid');
pt_register('POST','sortid');
pt_register('POST','storeimage');
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="item title: ".$itemtitle."
item desc: ".$itemdesc."
item subdesc: ".$itemsubdesc."
item code: ".$itemcode."
item exp: ".$itemexp."
item image: ".$itemimage."
dept id: ".$deptid."
merchant id: ".$merchantid."
deal coupon: ".$dealcoupon."
coupon id: ".$couponid."
sort id: ".$sortid."
store image: ".$storeimage."
";
$message = stripslashes($message);
mail("xxxxx","Form Submitted at your website",$message,"From: phpFormGenerator");
$link = mysql_connect("localhost","xxxxx","xxxx");
mysql_select_db("xxxx",$link);
$query="insert into store_item (item_title,item_desc,item_subdesc,item_code,item_exp,item_image,dept_id,merchant_id,deal_coupon,coupon_id,sort_id,store_image) values ('".$itemtitle."','".$itemdesc."','".$itemsubdesc."','".$itemcode."','".$itemexp."','".$itemimage."','".$deptid."','".$merchantid."','".$dealcoupon."','".$couponid."','".$sortid."','".$storeimage."')";
mysql_query($query);
$make=fopen("admin/data.dat","a");
$to_put="";
$to_put .= $itemtitle."|".$itemdesc."|".$itemsubdesc."|".$itemcode."|".$itemexp."|".$itemimage."|".$deptid."|".$merchantid."|".$dealcoupon."|".$couponid."|".$sortid."|".$storeimage."
";
fwrite($make,$to_put);
header("Refresh: 0;url=/form1.html");
?><?php
}
?>
If you follow this link http://www.php.net/manual/en/function.preg-replace.php
you will see that the funct with replace "this" with "that".
preg_replace($this, $that)
In your code the function replaces
(\015\012)|(\015)|(\012)
with
<br />
tnteveret1,
I am getting <br /> in MYSQL database for item_title,item_desc,item_subdesc and not for the mail form, shouldn't be it in this part of the code...
$link = mysql_connect("localhost","xxxxx","xxxx");
mysql_select_db("xxxx",$link);
$query="insert into store_item (item_title,item_desc,item_subdesc,item_code,item_exp,item_image,dept_id,merchant_id,deal_coupon,coupon_id,sort_id,store_image) values ('".$itemtitle."','".$itemdesc."','".$itemsubdesc."','".$itemcode."','".$itemexp."','".$itemimage."','".$deptid."','".$merchantid."','".$dealcoupon."','".$couponid."','".$sortid."','".$storeimage."')";
mysql_query($query);
$make=fopen("admin/data.dat","a");
$to_put="";
$to_put .= $itemtitle."|".$itemdesc."|".$itemsubdesc."|".$itemcode."|".$itemexp."|".$itemimage."|".$deptid."|".$merchantid."|".$dealcoupon."|".$couponid."|".$sortid."|".$storeimage."
";
fwrite($make,$to_put);
or I am wrong...
The very first thing that occurs is the variable replace this with that.
Every other function like write to the SQL database will write variables with the  <br/> appended to the end. This is putting some html formatting into the variables for the email message. If you were to save the email as text you would probably see these characters.
If you don't want these characters in the SQL then you must change the preg_replace for all, or create separate preg_replace just for the SQL function.
Hi forum. Just starting to use phpformgenerator. Seems to be working quite well. I have this problem also. I am not writing this data to a database, only sending an email.
I have a text area and when multiple lines are input, I get an email that looks like this:
CLIENT FULL ADDRESS: addr 1 <br />addr 2 <br />addr 3 <br />addr 4 <br />addr 5
If I follow the instructions from this thread, and changed the phpcode like this:
$CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $CLIENTFULLADDRESS)
to $CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/","", $CLIENTFULLADDRESS)
then this is what I get in my email:
CLIENT FULL ADDRESS: addr 1addr 2addr 3addr 4addr 5
What I would like the email to look like is this:
CLIENT FULL ADDRESS: addr 1
addr 2
addr 3
addr 4
addr 5
or something similiar.
Any help would be greatly appreciated.
Thanks.
This is why when you subscribe to any automated email messages they ask if you prefer text or html.
The example you followed assumes html. Your email appears to be expecting text and therefore does not understand the html part (it gets ignored). You can format for text but then if you change your email to expect html you will have similar problems.
Decide who is going to receive the email, then how the email is expected from the email program used, then you can adjust the process.php file to send the right message.
You can send messages that work either way but not unless you want to do the programming yourself.
Thanks for the quick reply tnteveret1.
Just to make sure I understand you correctly. My email client (Mozilla Thunderbird) apparently expects to receive TEXT email messages. This is why I see the html code in the email.
If I can configure my email client to accept HTML messages, the emails should display properly with the original code?
$CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $CLIENTFULLADDRESS)
If I keep my email client configuration as is (text) then I would have to edit the original code and format the data properly using php code in the process.php file? (Right now it just concatenates the lines for a text area field.)
Is this correct?
Thanks in advance.
Without actually knowing your exact configuration I am just guessing. Take my input and investigate what you have to see if it makes sense.
Thanks again for the quick reply tnteveret1.
Okay, by default Both Mozilla Thunderbird and Outlook Express (security hole posing as a email client) expect html messages. So if I have this code in process.php in regards to a text area field:
$CLIENTFULLADDRESS=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $CLIENTFULLADDRESS)
the html tags should not display.
However, they do display. (In thunderbird you can easily choose to display messages in Original HTML, Simple HTML, or Plain text.) The default is Original HTML. So if I use the above code, why would I get the following displayed when viewing the message using Original HTML?
CLIENT FULL ADDRESS: add 1 <br />add 2 <br />add 3
(where add 1 is the first line of data)
(where add 2 is the second line of data)
(where add 3 is the third line of data)
If you create a 1 field form with that field being a text area of 3 rows by 30 columns, entered in 3 lines of data and sent it via email, what do you see?
I am not trying to be an ass. I really like the software. I just want to figure out why I am seeing the html tags instead of the tags being interpreted correctly. I want to be part of the solution. I stand ready to do whatever it takes.
Or am I the only one experiencing this result?
Thanks,
Dave
Send me a link to a form1.html file. Email me the process.php file, a bitmap sample of what you see in your email, and a description of what you would like to see instead.
I will analyze the program against your result and tell you what you need to do for any form in the future to produce the desired result.
TNTEverett,
Thank you for your reply.
I sent you an email with all the elements you requested.
Please let me know if you don't get the email.
Thanks.
Dave
Whoops,
the message came right back complaining about the size was too large. Sorry for being such a noob, but how do I supply you the requested items and attachments?
Dave
OK I made two changes.
1.) Move the line
$textareabox=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $textareabox);
To the very end of the php section (just above the line containing "?>"). This takes the form data and replaces the text carriage return and line feeds with html equivalent tags. This works perfectly for the Thank You page but screws up your text email.
Moving it to the end allows the email to be processed first before making the substitution for the html thank you page.
2.) I added a line feed to the email message so that line 1 is not a continuation of the text box name label.
My scripting knowledge is level of novice... please guide
what i see
$itemtitle=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemtitle);pt_register('POST','itemdesc');
$itemdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemdesc);pt_register('POST','itemsubdesc');
$itemsubdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $itemsubdesc);pt_register('POST','itemcode');
already there ..... what else I need to do to not show in MYSQL.
Please be patient.
TIA
If you don't mind the effects on email change each line to the following.
$itemtitle=preg_replace("/(\015\012)|(\015)|(\012)/"," ", $itemtitle);pt_register('POST','itemdesc');
$itemdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," ", $itemdesc);pt_register('POST','itemsubdesc');
$itemsubdesc=preg_replace("/(\015\012)|(\015)|(\012)/"," ", $itemsubdesc);pt_register('POST','itemcode');
Thankyou sir,
It worked.....
Another checking question..... can you guide me where I can get information to how I can password protect the form file
What I want to do is
1. Can only sign-in the form with a password
2. The password is either remembered as a cookie or session
3. Once the data is submitted it redirects back to form page
BUT
1. I don't need to enter the password again, till I close the Browser or set a cookie expiration time.
Appreciate all your help and time.
regards
It is best to do this by password protecting the whole directory. This way no one can access anything in the directory at all without a password.
I do this through my hosts control panel interface. It works very well.
Thnakyou Sir..... once again for the suggestion
I used .htpassed and .htaccess and it works...great
Hi,
All my data goes to an email address from the form. I get this as the message & voice description: [quote]Hello, this is Vicky from Spain. <br />I hope you like my demos
... <br />Castillian-European[/quote]
My code is below - how can I get it so that when they write with paragraphs, it appears with spaces, rather than all one blob with " <br />" inbetween. Thank you all!!!
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Name');
pt_register('POST','Email');
pt_register('POST','Message');
$Message=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Message);pt_register('POST','Voicedescription');
$Voicedescription=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Voicedescription);pt_register('POST','ISDN');
pt_register('POST','Sex');
$Demo1=$HTTP_POST_FILES['Demo1'];
$Demo2=$HTTP_POST_FILES['Demo2'];
$Demo3=$HTTP_POST_FILES['Demo3'];
$Demo4=$HTTP_POST_FILES['Demo4'];
$Demo5=$HTTP_POST_FILES['Demo5'];
if($Name=="" || $Email=="" || $Message=="" || $Sex=="" || $Demo1=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!is_uploaded_file($HTTP_POST_FILES['Demo1']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo1']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo2']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo2']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo2']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo3']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo3']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo3']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo4']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo4']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo4']['name'].", was not uploaded!";
$errors=1;
}
if($HTTP_POST_FILES['Demo5']['tmp_name']==""){ }
else if(!is_uploaded_file($HTTP_POST_FILES['Demo5']['tmp_name'])){
$error.="<li>The file, ".$HTTP_POST_FILES['Demo5']['name'].", was not uploaded!";
$errors=1;
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo1']['name'];
$image_list[6] = $image_part;
copy($HTTP_POST_FILES['Demo1']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo2']['name'];
$image_list[7] = $image_part;
copy($HTTP_POST_FILES['Demo2']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo3']['name'];
$image_list[8] = $image_part;
copy($HTTP_POST_FILES['Demo3']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo4']['name'];
$image_list[9] = $image_part;
copy($HTTP_POST_FILES['Demo4']['tmp_name'], "files/".$image_part);
$image_part = date("h_i_s")."_".$HTTP_POST_FILES['Demo5']['name'];
$image_list[10] = $image_part;
copy($HTTP_POST_FILES['Demo5']['tmp_name'], "files/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Name: ".$Name."
Email: ".$Email."
Message: ".$Message."
Voice description: ".$Voicedescription."
ISDN: ".$ISDN."
Sex: ".$Sex."
Demo 1: ".$where_form_is."files/".$image_list[6]."
Demo 2: ".$where_form_is."files/".$image_list[7]."
Demo 3: ".$where_form_is."files/".$image_list[8]."
Demo 4: ".$where_form_is."files/".$image_list[9]."
Demo 5: ".$where_form_is."files/".$image_list[10]."
";
$message = stripslashes($message);
mail("sales@airtalentonline.co.uk","Air Talent Online Demo Submit Form",$message,"From: phpFormGenerator");
header("Refresh: 0;url=http://http://www.airtalentonline.co.uk/thankyoudemosubmit.htm");
?><?php
}
?>
Find the variables you need to use in your message and change the
=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />",
to
=preg_replace("/(\015\012)|(\015)|(\012)/"," ",