1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need Quick Php Code Will Pay!

Discussion in 'PHP' started by Ntech25, Nov 12, 2008.

  1. #1
    I made this form on my website http://crstylestudio.com/contactus.php Now only thing I don't know how to do is code the part when someone fills form out and clicks submit that it sends me a email.

    Could anyone help. I will pay you right away. Need this done by tonight
     
    Ntech25, Nov 12, 2008 IP
  2. xenous

    xenous Peon

    Messages:
    102
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Which one you prefer? attaching the php here and me getting it done or would i do it myself directly and send to you?
     
    xenous, Nov 12, 2008 IP
  3. Ntech25

    Ntech25 Active Member

    Messages:
    372
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Would you be able to pm me it? and where to put it?
     
    Ntech25, Nov 12, 2008 IP
  4. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #4
    something like this?

    
    if (!$_POST['submit'])
    
    
    {
    
    
            ?>
    
    
    
    
    
            <script language="Javascript">
    
    
                    function CheckForm()
    
    
                    {
    
    
                            from = document.getElementById('from');
    
    
                            message = document.getElementById('message');
    
    
                            if (!from.value || !message,value)
    
    
                            {
    
    
                                    alert("Email ID or message is missing !");
    
    
                                    return false;
    
    
                            }
    
    
                            else return true;
    
    
                    }
    
    
            </script>
    
    
            <center><h1>Mail Your Queries</h1></center><h3>Submit your queries using the form below</h3>
    
    
            <form action="contactus.php" method="post" onsubmit="return CheckForm();"><br/>
    
    
                    <input size="40" type="text" name="from" value="Enter Your Email ID" size="120" onfocus="if(this.value=='Enter Your Email ID'){this.value=''}" ><br /><br />
    
    
                    <input size="40" type="text" name="subject" value="Enter Your Subject" size="120" onfocus="if(this.value=='Enter Your Subject'){this.value=''}" ><br /><br />
    
    
                    <textarea name="message" rows="5" cols="5" onfocus="if(this.value=='Enter Your Query Here'){this.value=''}">Enter Your Query Here</textarea><br/>
    
    
                    <input name="submit" type="submit" value="Send Query" > <br /><br />
    
    
            </form>
    
    
    
    
    
            <?
    
    
    }
    
    
    else
    
    
    {
    
    
            ?>
    
    
    
    
    
            <center><h1>Mail Your Queries</h1></center>
    
    
            <h3>Your queries have been send. Thanks for your concern. You will contacted soon </h3>
    
    
    
    
    
            <?
    
    
            $to      = 'email@email.com';
    
    
            $from    = addslashes($_POST['from']);
    
    
            $subject = addslashes($_POST['subject']);
    
    
            $message = addslashes($_POST['message']);
    
    
            $headers = 'From: '.$from . "\r\n" .
    
    
        'Reply-To: email@email.com' . "\r\n" .
    
    
        'X-Mailer: PHP/' . phpversion();
    
    
            mail($to, $subject, $message, $headers);
    
    
    
    
    
    }
    
    PHP:
    You need to customized it to your own needs. :)

    I use it on my site
     
    proxywhereabouts, Nov 12, 2008 IP
  5. Ntech25

    Ntech25 Active Member

    Messages:
    372
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Ntech25, Nov 12, 2008 IP
  6. xenous

    xenous Peon

    Messages:
    102
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    just be patient i am going to attach the contact.php here
     
    xenous, Nov 12, 2008 IP
  7. Ntech25

    Ntech25 Active Member

    Messages:
    372
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Thanks a lot.
     
    Ntech25, Nov 12, 2008 IP
  8. xenous

    xenous Peon

    Messages:
    102
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    here you go.
    your contactus.php hasto change also and is in the zip
     

    Attached Files:

    xenous, Nov 12, 2008 IP
    Ntech25 likes this.
  9. Ntech25

    Ntech25 Active Member

    Messages:
    372
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #9
    Thank you for the work

     
    Ntech25, Nov 12, 2008 IP
  10. ghprod

    ghprod Active Member

    Messages:
    1,010
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #10
    solved?? or not yet??

    regards
     
    ghprod, Nov 13, 2008 IP