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
Organizing php contact form email
Old 12-01-2007, 12:41 AM Organizing php contact form email
Skilled Talker

Posts: 90
Location: Tokyo, Japan
Trades: 0
I recently got my php Contact form to work... but I was wondering
how do I organize the email?

I *THINK* this is the code which sends the emailll, but im not quite sure how to make it organized. WHen i send an email, it comes in one line....

PHP Code:
<?
include 'ssconfig.php';
$h='http://www.';$r='reconn.us';
$text_string="<b>".$contact_us_text."</b> ".$your_text;
$subject=$_POST['nume']."MUSEic Fest Website Response";
$k='class';$k1='ifieds';$k2=' php';
if(
$_SERVER['REQUEST_METHOD']=='POST')
    {
        
$msg="Contact us form completed:\n";
        
$msg.="1. Name :".$_POST['name']."\n";
        
$msg.="2. E-mail:".$_POST['email']."\n";
        
$msg.="3. Web:".$_POST['website']."\n";
        
$msg.="3. Message:"$_POST['comment']."\n";
        
mail$to$subject$msg,"From:".$_POST['name']." <".$_POST['email'].">\nX-Sender: <".$_POST['email'].">\nX-Priority: 1\nReturn-Path: <".$_POST['email'].">\nContent-Type: text/html; charset=iso-8859-1\n" );
        echo 
'<table border= "0" cellpadding = "0" cellspacing="0" width="400" class="contact_us"><tr><td><div align=center class="contact"><table align=center><tr><td height=280>';
        echo 
'<p class="sent_message">'.$sent_message.'</p></td></tr></table></div></td></tr></table>';
        }
    else
        {
        
?>
        <table width="400" class="contact_us" cellpadding="0" cellspacing="0"><tr><td><div class="contact">
        <?php echo $text_string ?><br><font size="1" face="Geneva, Arial, Helvetica, sans-serif">
                        
        <?php echo $small_text ?></font><br><br>
          <form name="form1" method="post" action= <?php echo basename($PHP_SELF); ?> >
          <table width=100% cellspacing="0" class="form_fonts">
            <tr>
           <td>Your Name</td>
           <td><input name="name" type="text" id="nume" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
        </tr>
        <tr>
           <td>Your E-mail</td>
           <td><input name="email" type="text" id="email" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
           </tr>
        <tr>
           <td>Your Website</td>
           <td><input name="website" type="text" id="website" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
       </tr>
           <tr>
           <td valign="top"><font size="2" face="Geneva, Arial, Helvetica, sans-serif">Comments</font></font></td>
           <td>
           <textarea name="mesaj" cols="37" rows="5" id="comment" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></textarea></td>
           </tr>
       </table>
           <p align="center">
           <input name="Submit" type="image" src="submit_a01.gif" border="0" value="Submit">
           <input type="image" src="reset_a01.gif" name="Submit2" value="Reset" onclick="this.form.reset();return false;">           
           </p>
            <DIV style="BORDER-TOP: 0px; OVERFLOW-Y: scroll; OVERFLOW-X: hidden; OVERFLOW: scroll; BORDER-LEFT: 1px; WIDTH: 100%; SCROLLBAR-ARROW-COLOR: #003366; BORDER-BOTTOM: 1px; BORDER-RIGHT-STYLE: none; SCROLLBAR-BASE-COLOR: #aebed8; HEIGHT: 1px"> 
                <?php
                $l
=$h.$r;
                echo 
'<a href="'.$l.'">'.$k.$k1.$k2.'</a>'.$l;
                
?>
                </DIV>
       </form>
    </div></td></tr></table>
           <? 
           
}
           
?>
__________________
My site:
:::
Please login or register to view this content. Registration is FREE
vaio2006 is offline
Reply With Quote
View Public Profile Visit vaio2006's homepage!
 
 
Register now for full access!
Old 12-01-2007, 04:34 AM Re: Organizing php contact form email
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
Change all of the \n to \r\n might solve your problem
__________________
Foundation Flash tutorials :
Please login or register to view this content. Registration is FREE


New Dreamed Up Web Design:
Please login or register to view this content. Registration is FREE
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Old 12-01-2007, 09:35 PM Re: Organizing php contact form email
Skilled Talker

Posts: 90
Location: Tokyo, Japan
Trades: 0
Quote:
Originally Posted by Foundationflash View Post
Change all of the \n to \r\n might solve your problem
doesn't seem to work..
__________________
My site:
:::
Please login or register to view this content. Registration is FREE
vaio2006 is offline
Reply With Quote
View Public Profile Visit vaio2006's homepage!
 
Old 12-02-2007, 08:01 AM Re: Organizing php contact form email
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
if you are sending the email as HTML every \n (newline) needs to have a <br> as well
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Organizing php contact form email
 

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.24932 seconds with 12 queries