mail form in a table

hi there,
I’ve got this code; which obviously sends email using flash. But the mail it sends is in a simple form. But the client wants it to be in a specific table layout. But I can’t do it. So that the mail that php send to the $to = address will be in a table layout. Help Please

[php]

<?php //initialize variables for To and Subject fields $to ='[email protected]'; $subject ='Sipari? Talebi'; //build message body from variables received in the POST array $message ='From:'.$_POST ['from']."n n"; $message .='Email:'.$_POST ['email']."n n"; $message .='Quantity:'.$_POST ['miktar']."n n"; $message .=ProducktCode:'.$_POST ['urun_kodu']."n n"; $message .='Dimentions:'.$_POST ['olculer']."n n"; $message .='Comments:'.$_POST ['comments']; //add additional email headers for more user-friendly reply $additionalHeaders ="From:Sipari? Formun"; $additionalHeaders .="Reply-To:$_POST [email ]"; //send email message $OK =mail($to,$subject,$message,$additionalHeaders); //let Flash know what the result was if ($OK){ echo 'sent=OK'; } else { echo 'sent=failed&reason='.urlencode('There seems to be a problem with the server.Please try later.'); } ?>[/php]

EDIT: Put code between [php] tags for readability.

What exactly is not working?
What errors are you getting?
Have you tried Debugging?
Have you tried searching Google/the PHP Manual?

Besides that, change your post to hide the email addresses. Spambots can see’em and use’em.

thereis no error, it’s working just fine.
But the mail it sends is in a simple mail layout.
The costumer wants to get mails in a specific table layout, like a black background white fonts and etc.
i don’t know how to set the font for the $message .
I’ve tried
echo ‘

$message

but doesn’t work :)
so what do I do to make it send the $message in a specific layout ?
clear enough ?

Okay, lemme put it this way: I edited your post, and you can see the highlighting. There definately are syntax errors there.

As for your question: it sounds like an HTML issue, rather than a PHP issue. Am I correct in assuming that you know (next to) nothing about HTML?

first of all there is nothing wrong with this code. It works just fine that I’ve tried in many emails. It’s working. I don’t have any problem with the code.

second, yeah I know nothing about HTML or FLASH or PHP but I’m working as a web designer.

anyhow,

the thing is, when someone fills out the form, it sends and email with a simple layout, like this :

Email : blah blah

Quantity : blah blah

Comments : I know nothing 'bout HTML

,but the as$wipe (who will be getting the mails) wants all that in a table layout. Not as a single text mail.

I have to get the php send the mail as an html mail or something,
so, when someone fills out the form, it’ll get the vars from Flash and put them inside a table and send it to the as$wipe (who is the owner of the site).

Still not clear enough ?
then am i wrong assuming that you have a hard time understanding the situation, NOT the PROBLEM.

well yeah there are sytnax errors in that code, which is obviously a paste problem, I changed something in the code for you to understand it, cause it’s written in some other language. And that’s something you should notice as well.
Again : There ain’t a thing wrong with the code. :)

Ctrl+C, Ctrl+V doesn’t omit single quotes, as shown by the highlighting. I’d suggest using error_reporting(E_ALL); at the top of your PHP script and tell me again that your code doesn’t contain errors :slight_smile: Coz I know it does.

Next, why not have as$wipe provide you the HTML he wants to receive it in? You’re providing the data, arn’t you?

uhmmm i do not need him to provide me nothing. GOd, why is it so hard to explain what i wanna do. Maybe its 'cuz english is not my native language (obviously) .
I saw the problem in the code I’ve pasted, but the original one isn’t like that. So that’s not the issue.

the contact form i created in Flash. And it sends the vars to feedback.php. And then if it gets the ‘OK’ message from the php file, it goes to a certain frame to tell the visitor that the message has been sent.

simple question :
how can I set the color of that $FROM message in the php ?
HEEEEELP

ok one last try :

$message .='From:'.$_POST ['isim']."n n";

the first ‘From:’ is displayed in the email.
How will I change it’s color to red, for example ?

$message .="<font color=red">'From:'</font>.$_POST ['isim']."n n";

??

this will not work I know, I just wanted to clearly ask what I want ?!

Alright :slight_smile: But the provided code is still faulty.
And I said to get your boss to provide the HTML code since he wants it, not you. Why make it your problem when it’s his? But yea, if you wanna do it, that’s fine with me.

If you say it works, it works. I figured the problem in the provided code was non-existant in the working code, since it wouldn’t have sent any email at all if it weren’t.

You can do that with HTML :slight_smile: Use a bit of CSS as well, as font tags are deprecated.

You can’t just come on here and ask us to fix your code. That’s not the way it works. And since this is an HTML problem (or rather, a lack of HTML knowledge problem), I don’t find this very worthy of a thread here. I’ll let it live though because it touches the core subject of the forums. As for my first post:

Have you tried searching Google/the PHP Manual?
I guess it's safe to answer this with a 'no', as searching Google for 'html' would have gotten you a ton of helpful links and tutorials, and probably W3Schools as well, which is a handy manual for HTML. We do expect some effort from your side, you know :/

oh my god. Ok I wont bother you again, but you have no idea what I’m talking about…

Sponsor our Newsletter | Privacy Policy | Terms of Service