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.

does anyone know how to make this work

Discussion in 'PHP' started by Top$hottEr, Mar 10, 2008.

  1. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Are you sure it's not just ending up in your junk mail folder?
     
    TwistMyArm, Mar 17, 2008 IP
  2. lephron

    lephron Active Member

    Messages:
    204
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #22
    There's your problem then - outgoing mail isn't configured from your server
     
    lephron, Mar 17, 2008 IP
  3. mytshans

    mytshans Peon

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #23
    why don't you try on your own mail server? just my opinion and technique I used to..:)
     
    mytshans, Mar 17, 2008 IP
  4. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #24
    This works
    put this above <HTML> tags at top of your code page.

    <?php
    // convert your form variables to PHP variables to work with them.
    $first_name = $_POST['user_first_name'];
    $last_name = $_POST['user_last_name'];
    $email = $_POST['user_email'];
    $comments = $_POST['comments'];

    // Mail section
    $to = 'contact@yoursite.com' ;
    $subject = 'They contacted us!' ;
    $message = $comments;
    $headers = 'From: ' . "\r\n" .
    'Reply-To:' . ' ' . $_POST['user_email'] . "\r\n" .
    'X-Mailer: PHP/' . phpversion();



    // check to see the form was filled out (also use some other validator would be good)
    // It'll only send you mail if the user first name was entered.

    if($_POST['user_first_name'] != NULL) {
    $ok2 = mail($to, $subject, $message, $headers);

    ?>

    <HTML>
    <HEAD> etc etc ...

    --------------

    form section
    ----------------
    <form name="whatever" method="post" action="name-of-this-page-you-make.php">
    First Name <input type="text" name="user_first_name" maxlength="50" size="30"><br>
    Last Name <input type="text" name="user_last_name" maxlength="50" size="30"><br>
    email <input type="text" name="user_email" maxlength="50" size="30"><br>
    <textarea name="comments" cols="30" rows="10" class="html-text-box">Enter your comments here...</textarea><br><br>
    <input type="submit" value="submit this form" onchange="this.form.submit">
    </form>


    The form is real basic, validate it more, clean it up for how it sits on your page ,blah blah
    but thats as good as it gets for FREE :)

    buy your printing from ezprintsolutions.com in exchange
     
    ezprint2008, Mar 18, 2008 IP
  5. Top$hottEr

    Top$hottEr Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #25
    thankyou everyone it now works but yes it is in my junk folder anyone know how to get it in the main folder
     
    Top$hottEr, Mar 18, 2008 IP
  6. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #26
    update
    onclick="this.form.submit"

    my bad <select> menu was in my mind when i wrote that. :)


    and close that if(statement) on the $ok2

    }
     
    ezprint2008, Mar 20, 2008 IP