The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 12 of 12

Thread: PHP Mailing Code Needing Help

  1. #1

    PHP Mailing Code Needing Help

    HTML (SNIPPET):
    <form action='process.php' method='post'>
    <table width='100%' align='center' cellpadding='10' cellspacing='0' bgcolor='#2B7460'' id='artist' style="border:1px solid #888;">
    <tr>
    <td><div align="center"><span class='formfont style2'><strong>Distributor: </strong></span>
    <select name='distributor'>
    <option value='' selected>-Select One-</option>
    <option value='rickmondstd'>Richmond Studio</option>
    <option value='richmondctr'>Richmond Contractor</option>
    <option value='richmondwkshp'>Richmond Workshop</option>
    <option value='cville'>Charlottesville Contractor</option>
    <option value='sterlingstd'>Sterling Studio</option>
    <option value='sterlingctr'>Sterling Contractor</option>
    <option value='leesburgctr'>Leesburg Contractor</option>
    <option value='leesburgwkshp'>Leesburg Workshop</option>
    <option value='columbiactr'>Columbia Contractor</option>
    <option value='raleighctr'>Raleigh Contractor</option>
    <option value='charlottectr'>Charlotte Contractor</option>
    </select>
    </div></td>
    </tr>
    <tr>
    <td><div align="center"><span class='formfont style3 style1'>Stone:</span><span class="style6">&nbsp;</span>&nbsp;&nbsp; <span class='formfont'>
    <select name='stone1'>
    <option value='' selected>-Select One-</option>
    <option value='AC>Abrebascatta Carrara</option>
    <option value='AB'>Absolute Black</option>
    <option value='ABA'>Absolute Black Antico</option>
    <option value='ABH'>Absolute Black Honed</option>
    <option value='AS'>Aegean Spice</option>
    <option value='AMC'>African Multi-Color</option>
    <option value='AM'>Almond Mauve</option>
    <option value='AB'>Angola Black</option>
    <option value='AW'>Antique Walnut</option>
    <option value='AB'>Asian Bluestone</option>




    PHP:

    <?
    $distributor = stripslashes($_POST['distributor']);
    $stone1 = stripslashes($_POST['stone1']);
    $stone2 = stripslashes($_POST['stone2']);
    $sonte3 = stripslashes($_POST['stone3']);
    $stone4 = stripslashes($_POST['stone4']);
    $stone5 = stripslashes($_POST['stone5']);
    $qty1 = stripslashes($_POST['qty1']);
    $qty2 = stripslashes($_POST['qty2']);
    $qty3 = stripslashes($_POST['qty3']);
    $qty4 = stripslashes($_POST['qty4']);
    $qty5 = stripslashes($_POST['qty5']);
    $add = stripslashes($_POST['add']);

    $body =
    "Distributor: $distributor\n".
    "Stone #1: $stone1, $qty1\n".
    "Stone #2: $stone2, $qty2\n".
    "Stone #3: $sonte3, $qty3\n".
    "Stone #4: $stone4, $qty4\n".
    "Stone #5: $stone5, $qty5\n".
    "Additional Info: $add\n".

    mail("ill_tekneekz@yahoo.com", "NEW ORDER", $body);
    if($send)
    {header( "Location: http://www.ricklanddirect.com/" );}
    else
    {print "We encountered an error sending your mail, please notify matthew.designs@gmail.com"; }
    }
    }
    ?>

    If The Whole Source Is Needed Check It Out On http://www.keofva.com/matt/orderform.html

  2. #2
    What's the problem then?
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  3. #3
    It's Not Sending E-Mail At All...I Guess It Freezes Up On Process.php.

  4. #4
    This line:
    PHP Code:
    if($send
    You haven't defined $send, so why are checking if it exists? :S
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  5. #5
    Oh So How Do I Fix That, I'm Not Very Good With PHP..Just Learning It.

  6. #6
    Try replacing:
    PHP Code:
    mail("ill_tekneekz@yahoo.com""NEW ORDER"$body); 
    with:
    PHP Code:
    $send mail("ill_tekneekz@yahoo.com""NEW ORDER"$body); 
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  7. #7
    Nope, Nothing...

  8. #8
    PHP Code:
    if ( !empty($_POST['submit']) )
    {
    mail("ill_tekneekz@yahoo.com""NEW ORDER"$body);
    header"Location: http://www.ricklanddirect.com/" );

    i removed the
    PHP Code:
    if ( $send 
    stuff cause with your current code it does absolutely nothing and is worthless, if that doesn't work you may need to check to make sure your php allows for short-tags. Which means you can't use
    PHP Code:
    <?

    ?>
    you have to use
    PHP Code:
    <?php

    ?>
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  9. #9
    Pls change your code with this code it is running...........


    <?
    $distributor = stripslashes($_POST['distributor']);
    $stone1 = stripslashes($_POST['stone1']);
    $stone2 = stripslashes($_POST['stone2']);
    $sonte3 = stripslashes($_POST['stone3']);
    $stone4 = stripslashes($_POST['stone4']);
    $stone5 = stripslashes($_POST['stone5']);
    $qty1 = stripslashes($_POST['qty1']);
    $qty2 = stripslashes($_POST['qty2']);
    $qty3 = stripslashes($_POST['qty3']);
    $qty4 = stripslashes($_POST['qty4']);
    $qty5 = stripslashes($_POST['qty5']);
    $add = stripslashes($_POST['add']);

    $body =
    "Distributor: $distributor\n".
    "Stone #1: $stone1, $qty1\n".
    "Stone #2: $stone2, $qty2\n".
    "Stone #3: $sonte3, $qty3\n".
    "Stone #4: $stone4, $qty4\n".
    "Stone #5: $stone5, $qty5\n".
    "Additional Info: $add\n";
    if($stone1){
    $send = mail("kinderjitsinghsodhi@gmail.com", "NEW ORDER", $body);
    if($send)
    {
    header( "Location: http://www.ricklanddirect.com/" );
    }
    else
    {
    print "We encountered an error sending your mail, please notify matthew.designs@gmail.com";
    }
    }


    ?>
    <form name="frm" action='' method='post'>
    <table width='100%' align='center' cellpadding='10' cellspacing='0' bgcolor='#2B7460' id='artist' style="border:1px solid #888;">
    <tr>
    <td><div align="center"><span class='formfont style2'><strong>Distributor: </strong></span>
    <select name='distributor'>
    <option value='' selected>-Select One-</option>
    <option value='rickmondstd'>Richmond Studio</option>
    <option value='richmondctr'>Richmond Contractor</option>
    <option value='richmondwkshp'>Richmond Workshop</option>
    <option value='cville'>Charlottesville Contractor</option>
    <option value='sterlingstd'>Sterling Studio</option>
    <option value='sterlingctr'>Sterling Contractor</option>
    <option value='leesburgctr'>Leesburg Contractor</option>
    <option value='leesburgwkshp'>Leesburg Workshop</option>
    <option value='columbiactr'>Columbia Contractor</option>
    <option value='raleighctr'>Raleigh Contractor</option>
    <option value='charlottectr'>Charlotte Contractor</option>
    </select>
    </div></td>
    </tr>
    <tr>
    <td><div align="center"><span class='formfont style3 style1'>Stone:</span><span class="style6">&nbsp;</span>&nbsp;&nbsp; <span class='formfont'>
    <select name='stone1' onchange="document.frm.submit();">
    <option value='' selected>-Select One-</option>
    <option value='AC'>Abrebascatta Carrara</option>
    <option value='AB'>Absolute Black</option>
    <option value='ABA'>Absolute Black Antico</option>
    <option value='ABH'>Absolute Black Honed</option>
    <option value='AS'>Aegean Spice</option>
    <option value='AMC'>African Multi-Color</option>
    <option value='AM'>Almond Mauve</option>
    <option value='AB'>Angola Black</option>
    <option value='AW'>Antique Walnut</option>
    <option value='AB'>Asian Bluestone</option>
    </select>
    </span>
    </div>
    </td>
    </tr>
    </table>
    </form>

  10. #10
    Quote Originally Posted by kinderjit View Post
    Pls change your code with this code it is running...........


    <?
    $distributor = stripslashes($_POST['distributor']);
    $stone1 = stripslashes($_POST['stone1']);
    $stone2 = stripslashes($_POST['stone2']);
    $sonte3 = stripslashes($_POST['stone3']);
    $stone4 = stripslashes($_POST['stone4']);
    $stone5 = stripslashes($_POST['stone5']);
    $qty1 = stripslashes($_POST['qty1']);
    $qty2 = stripslashes($_POST['qty2']);
    $qty3 = stripslashes($_POST['qty3']);
    $qty4 = stripslashes($_POST['qty4']);
    $qty5 = stripslashes($_POST['qty5']);
    $add = stripslashes($_POST['add']);

    $body =
    "Distributor: $distributor\n".
    "Stone #1: $stone1, $qty1\n".
    "Stone #2: $stone2, $qty2\n".
    "Stone #3: $sonte3, $qty3\n".
    "Stone #4: $stone4, $qty4\n".
    "Stone #5: $stone5, $qty5\n".
    "Additional Info: $add\n";
    if($stone1){
    $send = mail("kinderjitsinghsodhi@gmail.com", "NEW ORDER", $body);
    if($send)
    {
    header( "Location: http://www.ricklanddirect.com/" );
    }
    else
    {
    print "We encountered an error sending your mail, please notify matthew.designs@gmail.com";
    }
    }


    ?>
    <form name="frm" action='' method='post'>
    <table width='100%' align='center' cellpadding='10' cellspacing='0' bgcolor='#2B7460' id='artist' style="border:1px solid #888;">
    <tr>
    <td><div align="center"><span class='formfont style2'><strong>Distributor: </strong></span>
    <select name='distributor'>
    <option value='' selected>-Select One-</option>
    <option value='rickmondstd'>Richmond Studio</option>
    <option value='richmondctr'>Richmond Contractor</option>
    <option value='richmondwkshp'>Richmond Workshop</option>
    <option value='cville'>Charlottesville Contractor</option>
    <option value='sterlingstd'>Sterling Studio</option>
    <option value='sterlingctr'>Sterling Contractor</option>
    <option value='leesburgctr'>Leesburg Contractor</option>
    <option value='leesburgwkshp'>Leesburg Workshop</option>
    <option value='columbiactr'>Columbia Contractor</option>
    <option value='raleighctr'>Raleigh Contractor</option>
    <option value='charlottectr'>Charlotte Contractor</option>
    </select>
    </div></td>
    </tr>
    <tr>
    <td><div align="center"><span class='formfont style3 style1'>Stone:</span><span class="style6">&nbsp;</span>&nbsp;&nbsp; <span class='formfont'>
    <select name='stone1' onchange="document.frm.submit();">
    <option value='' selected>-Select One-</option>
    <option value='AC'>Abrebascatta Carrara</option>
    <option value='AB'>Absolute Black</option>
    <option value='ABA'>Absolute Black Antico</option>
    <option value='ABH'>Absolute Black Honed</option>
    <option value='AS'>Aegean Spice</option>
    <option value='AMC'>African Multi-Color</option>
    <option value='AM'>Almond Mauve</option>
    <option value='AB'>Angola Black</option>
    <option value='AW'>Antique Walnut</option>
    <option value='AB'>Asian Bluestone</option>
    </select>
    </span>
    </div>
    </td>
    </tr>
    </table>
    </form>

    What Do You Mean Change It With That One? Got AOL or Yahoo Messenger?
    AOL/AIM = Nokio244
    YAHOO = iLL_TeKNeekZ

  11. #11
    He was just telling you how to assign the $send to something that can be checked against. but there's a few things w/ his code that I wouldn't do, but it should work for ya .
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  12. #12
    If Anyone Has The Time To Sit Down, And Walk Me Through It Over An IM I Have Yahoo, And AOL/AIM And mIRC...

    Yahoo = ill_tekneekz
    AOL/AIM = Nokio244
    mIRC = TeKNeekZ On EFnet

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012