Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Allow user to gt a copy [checkbox].. formatting problem
Old 09-27-2010, 10:46 PM Allow user to gt a copy [checkbox].. formatting problem
Junior Talker

Posts: 4
Name: Dayle Sheward
Trades: 0
Ok, I have a form that works great, but i would like to give the user the option to receive a copy themselves, as well as a copy going to admin (myself). Currently I have a checkbox 'emailCopy' set up... and it is successfully sending a copy, but the formatting of the data is not what I want. I am getting back:
The following information was submittedDayle2sampledocket

And, I would like it to look like this:

The following information was submitted Dayle2
sampledocket

In other words, separated lines... currently, I am getting no spaces in between the submitted data.

Here is my code:

// Send user a copy
if(@$_POST['emailCopy']){//the name of the cc me checkbox

$to=$_POST['email'];//the name of the email input field
$subject='Studio Job Form Receipt';
$message='The following information was submitted'.$_POST['name'] .$_POST['docket'];'\n\r'. // concatenate the other values to the message using a period or more usefully

mail($to,$subject,$message);
}


Actually, if there is just a way to send an exact copy to the use as what the admin receives... that would be even better. I have tried everthing with my limited knowledge... this is the closets I have gotten to it working.

Thanks!
dayle is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-28-2010, 03:11 AM Re: Allow user to gt a copy [checkbox].. formatting problem
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Wait, if i understood well you can send a copy to yourself but not the user?

Just put another mail function with users email
'emailCopy' is your checkbox name?

Try this:
PHP Code:
if(!empty($_POST['emailCopy'])){//the name of the cc me checkbox 
or this, i dont know your checkbox value:
PHP Code:
if(isset($_POST['emailCopy'])){//the name of the cc me checkbox 
It's better to check if it is set and value = ...

Last edited by miki86; 09-28-2010 at 03:18 AM..
miki86 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Allow user to gt a copy [checkbox].. formatting problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11089 seconds with 12 queries