PHP Master PLEASE!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    PHP Master PLEASE!

    Jello everyone!
    I have three variables that need to be sent to the to the PHP code (below)
    The first is sTo = me_result this represents an end users email and needs to be sent to the PHPs $to where there is now ="[email protected]".

    The second is sSubject = "Your Password you requested" you can guess where that goes (subject)

    The third is sMessage = "Your password is:" ..pass_result again this goes in the message area.

    The code in AMS goes like this:
    result = HTTP.Submit("http://www.mywebsite.com/passemail.php", {to=sTo, subject=sSubject, message=sMessage}, SUBMITWEB_POST, 20, 80, nil, nil);

    Can anyone help me get this to work?

    <?php
    $to="[email protected]";
    if (isset($_REQUEST['message']))
    {
    //$message = wordwrap($_REQUEST['message'], 70, "<br>\n", TRUE);
    $message =$_REQUEST['message'];
    if (isset($_REQUEST['subject']))
    {
    $subject = $_REQUEST['subject'];
    mail ("$to","$subject","$message","From: Your Password Protector");
    echo "success";
    }
    else
    echo "no subject";
    }
    else
    {
    echo "no message";
    }
    exit;
    ?>
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    #2
    Anyone PLEASE

    Comment

    • sara2006
      Forum Member
      • Apr 2006
      • 32

      #3
      use this link http://www.indigorose.com/forums/sho...48&postcount=1

      Comment

      • Bruce
        Indigo Rose Customer
        • Jun 2001
        • 2134

        #4
        Thank you SARA for your reply!
        This was what I was using before:

        <?php

        mail($to, $subject, $message, "From: Your Password Protector");

        exit;

        ?>

        But... It just doesn't have the punch the other one has (Thanks Tigg) So, I need to convert the pitbull above to suit my needs.

        Comment

        • TJ_Tigger
          Indigo Rose Customer
          • Sep 2002
          • 3159

          #5
          If you want to get set the variable $to to what is provided via http.submit the you can try this.

          PHP Code:
          <?php 
          if (isset($_REQUEST['to']))
               {
               
          $to=$_REQUEST['to']; 
               if (isset(
          $_REQUEST['message']))
                    {
                    
          //$message = wordwrap($_REQUEST['message'], 70, "<br>\n", TRUE);
                    
          $message =$_REQUEST['message'];
                    if (isset(
          $_REQUEST['subject']))
                         {
                         
          $subject $_REQUEST['subject'];
                         
          mail ("$to","$subject","$message","From: Your Password Protector"); 
                         echo 
          "success";
                         }
                    else
                         echo 
          "no subject";
                    }
               else 
                   {
                    echo 
          "no message";
                    }
               }
          else
              {
               echo 
          "no e-mail";
               }
          exit;
          ?>
          Tigg
          TJ-Tigger
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

          Comment

          Working...
          X