This is a discussion on "Very basic Email content formatting PHP" within the PHP Forum section. This forum, and the thread "Very basic Email content formatting PHP are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Very basic Email content formatting PHP
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Very basic Email content formatting PHP
I really know nothing at all about PHP language but I have this set up in an email php file that takes from a flash file. My question is how can I format this so that it doesn't just list the info. For instance, I would like it to display the information in the email like this:
Name: First, Last Email: Email Phone: Area-Phone Message: Message With each of these, the variable is shown after the ":"
Dave Last edited by karinne; Jul 23rd, 2007 at 15:00. Reason: Please use [php]...[/php] tags when displaying PHP code! |
|
|
|
||||
|
Re: Very basic Email content formatting PHP
1, 2, 3, here you go:
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: Very basic Email content formatting PHP
Well for some reason it doesn't send the email with the revised code. Just to make sure I gave you the correct info, here are my variable names from the input fields of the flash form:
First Last Area Phone Message Thanks again for your help, Dave |
|
||||
|
Re: Very basic Email content formatting PHP
OK, I was assuming that the post values were already stored in the PHP variables?? Try this:
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: Very basic Email content formatting PHP
That code works and displays the variable info in the email, but is still displays it like this:
David Blake 715 443-3344 Test 2 This is how I would like it: Name: David Blake Phone Number: 715-9443-3344 Message: Test 2 So it would display the word "Name" and then the variable from the form fields, the words "Phone Number" and then the values from the fields, etc.. Hope this makes sense. Dave |
|
||||
|
Re: Very basic Email content formatting PHP
huh? The code in both of my posts does exactly what you are describing??? Post the code you are using again.
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: Very basic Email content formatting PHP
Here's all the code I have in the php page:
Last edited by karinne; Jul 23rd, 2007 at 15:00. Reason: Please use [php]...[/php] tags when displaying PHP code! |
|
||||
|
Re: Very basic Email content formatting PHP
HMMM. Here's an example page that I tested and it does work:
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: Very basic Email content formatting PHP
Now it won't even send the email anymore. I think I'm retarded. I'm going to back off for a bit and come back at this with a fresh look and see if I can figure out what's going on.
Thanks for all your help though! Dave |
|
|||
|
Re: Very basic Email content formatting PHP
Quote:
2. Even then, it will only work if you call it mt.php as that's the name of the page that the form submits to. |
|
|||
|
Re: Very basic Email content formatting PHP
Well I finally got it going! (at least it works now anyway!)
Here is the code I used... <?php $sendTo = "dblake@kiddykiosk.com"; $subject = "Kiddy Kiosk Inquiry"; $message="Name:*".$_POST['First']."*".$_POST['Last']; $message.="\nEmail:*".$_POST['Email']; $message.="\nPhone:*".$_POST['Area']."-".$_POST['Phone']; $message.="\nCellphone:*".$_POST['CellArea']."-".$_POST['CellPhone']; $message.="\nLocation:*".$_POST['City']."-".$_POST['State']; $message.="\nMessage:*".$_POST['Message']; mail($sendTo, $subject, $message, "From: Kiosk Contact Form\n"); ?> Thanks everyone for all your help! Dave |
|
||||
|
Re: Very basic Email content formatting PHP
No problem, it's always a pleasure...
GO DAVE!!!
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
![]() |
| Tags |
| php language |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Expandable Content Script (Swtich Content) | Matc | JavaScript Forum | 0 | Apr 8th, 2008 10:53 |
| Content Placement + Content Dividing | josephman1988 | Website Planning | 2 | Jan 22nd, 2008 05:02 |
| Form submits to email via php, but email is blank!!?? | DH1234 | PHP Forum | 2 | Jun 18th, 2007 10:42 |
| Newbie Question- Basic HTML email method="post" | Bagel | Web Page Design | 4 | Aug 18th, 2006 12:03 |
| XML Help for Newbie - Formatting Content | AceTutor | Other Programming Languages | 0 | Jul 31st, 2006 12:04 |