email notif help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    email notif help

    Hey guys please tell me what did i do wrong here it dnt send the email
    Code:
    ////////////////////////////////////////REPLY TO COMMENT
    
    else if($action=="commentreplyaction")
    
    {
    
      addonline(getuid_sid($sid),"Replying To a Photo''s Comment ","");
       include("css.inc.php");
    $id = $_GET["id"];
    
      $reply = $_POST["reply"];
    
    
    
      echo "<p align=\"left\">";
     <?php
    $tolog = false;
      $uid = getuid_sid($sid);
    
      $res = mysql_query("UPDATE usergallery_rating SET commentsreply='".$reply."' WHERE id='".$id."'");
    
       if($res){
    
    
    
         echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Replyed Successfully<br/>";
             }
    
       else{
    
         echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully<br/>";
           $tolog = true;
       }
    
      echo "</p>";
    
    if($tolog)
    {
    $msg = "\n Name: ".$uid." \n made a comment on ur photo.";
    $subj = "Comment ".$reply."";
    $headers = 'Retrivewap: retrivewap.co.za' . "\r\n" .
    'jacques@waplive.co.za' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    mail($email, $subj, $msg, $headers);
    }else{
      echo "<p><small>";
    
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    
      echo " &#62; ";
    
      echo "<a href=\"gallery2.php?action=main&amp;sid=$sid\">Photo gallery</a>";
    
      echo " &#62; ";
    
      echo "Replyed to a Comment";
    
      echo "</small></p>";
    
    
    
    exit();
    
    
    }
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    #2
    Code:
    $email = "jacques@waplive.co.za";
    $subj = "Reply";
    $msg = "\n Name: ".$uid." \n made a comment on ur photo.";
    $subj = "Comment ".$reply."";
    $headers = 'Retrivewap: retrivewap.co.za' . "\r\n" .
    'jacques@waplive.co.za' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    mail($email, $subj, $msg, $headers);
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      hey guys can u tell me if i add this wrong coz it dnt wont to sent the email as it supost to
      Code:
      ////////////////////////////////////////REPLY TO COMMENT
      
      else if($action=="commentreplyaction")
      
      {
      
        addonline(getuid_sid($sid),"Replying To a Photo''s Comment ","");
         include("css.inc.php");
      $id = $_GET["id"];
      
        $reply = $_POST["reply"];
      
      
      
        echo "<p align=\"left\">";
      $tolog = false;
        $uid = getuid_sid($sid);
      
        $res = mysql_query("UPDATE usergallery_rating SET commentsreply='".$reply."' WHERE id='".$id."'");
      
         if($res){
      
      
      
           echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Replyed Successfully<br/>";
               }
      
         else{
      
           echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully<br/>";
             $tolog = true;
         }
      
        echo "</p>";
      
      if($tolog)
      {
      $email = "jacques@waplive.co.za";
      $subj = "Reply";
      $msg = "\n Name: ".$uid." \n made a comment on ur photo.";
      $subj = "Comment ".$reply."";
      $headers = 'Retrivewap: retrivewap.co.za' . "\r\n" .
      'jacques@waplive.co.za' . "\r\n" .
      'X-Mailer: PHP/' . phpversion();
      mail($email, $subj, $msg, $headers);
      }else{
        echo "<p><small>";
      
        echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      
        echo " &#62; ";
      
        echo "<a href=\"gallery2.php?action=main&amp;sid=$sid\">Photo gallery</a>";
      
        echo " &#62; ";
      
        echo "Replyed to a Comment";
      
        echo "</small></p>";
      
      
      
      exit();
      
      
      }
      
       }
      ________________
      Jacques
      jacques@gw-designs.co.za
      http://coding.biz.tm
      Come join and lets make it a place to learn all the noobies how to code
      __________________

      NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

      Comment


        #4
        your sending the message if the mysql querry fails

        change to
        PHP Code:
        if($res){
             echo 
        "<img src=\"../images/ok.gif\" alt=\"o\"/>Replyed Successfully<br/>";
             
        $tolog true;
                 }else{
             echo 
        "<img src=\"../images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully<br/>";
                  } 

        Comment


          #5
          tanx sumthing ill test it now

          THANX someone else working 100%
          Last edited by riderz; 05.09.10, 19:07.
          ________________
          Jacques
          jacques@gw-designs.co.za
          http://coding.biz.tm
          Come join and lets make it a place to learn all the noobies how to code
          __________________

          NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

          Comment


            #6
            at the moment your only sending the email to jacques@waplive.co.za to send it to the user you would have to use:
            $email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));

            $who would have to be selected from the gallery table but i dont know what that sql is :P

            Comment


              #7
              ok tanx let me fast see if i change the email code if it working then im using usergallery for my database

              Added after 17 minutes:

              ive tried this but it dont work guess the sql query arnt right
              Code:
              ////////////////////////////////////////RATE USER
              
              else if($action=="rateuser")
              
              {
              
                addonline(getuid_sid($sid),"Rating a Photo","");
                   include("css.inc.php");
              
              $rate = $_POST["rate"];
              
                $comment = $_POST["comment"];
              
              
              
                $uid1 = getuid_sid($sid);
              
                $item = mysql_fetch_array(mysql_query("SELECT uid, id, imageurl, sex FROM usergallery WHERE uid='".$whoimage."'"));
              
              
              
                $rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$whoimage."'"));
              
              
                 $tolog = false;
                if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
              
                {
              
                 echo "<p align=\"left\">";
              
                 $uid = getuid_sid($sid);
              
                 if((strlen($comment))>1){
              
                 $res= mysql_query("INSERT INTO usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='Y'");
              
                 }else
              
                 if((strlen($comment))<2){
              
                 $res= mysql_query("INSERT INTO usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='N'");
              
                 }
              
              
              
                 if(($res) and ((strlen($comment))>1)){
              
                   echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Rated Successfully<br/>";
              
                   echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Comments added Successfully<br/>";
                     $tolog = true;
                       }else
              
                 if(($res) and ((strlen($comment))<2)){
              
              
              
                   echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Rated Successfully<br/>";
              
                   echo "<img src=\"../images/notok.gif\" alt=\"x\"/>No Comments were added<br/>";
              
                  $tolog = true;
                       }else{
              
                   echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Rated unsuccessfully<br/>";
              
                   echo "<img src=\"../images/notok.gif\" alt=\"x\"/>No Comments were added<br/>";
              
                 }
              
                echo "</p>";
              
                   if($tolog)
              {
               $uid = getnick_uid($who);
               $who = mysql_fetch_array(mysql_query("SELECT uid FROM usergallery WHERE uid='".$who."'"));
              $email = mysql_fetch_array(mysql_query("SELECT email FROM rmembers WHERE id='".$who."'"));
              $subj = "Reply";
                $uid = getuid_sid($sid);
              $msg = "\n Name: ".$uid." \n made a comment on ur photo.  ".$reply."<b></b>";
              $subj = "Comment";
              $headers = 'Retrivewap: retrivewap.co.za' . "\r\n" .
              'jacques@waplive.co.za' . "\r\n" .
              mail($email, $subj, $msg, $headers);
              }else{
              
                echo "<p><small>";
              
                echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
              
                echo " &#62; ";
              
                echo "<a href=\"gallery2.php?action=main&amp;sid=$sid\">Photo gallery</a>";
              
                echo " &#62; ";
              
                echo "Rating a Photo";
              
                echo "</small></p>";
              
              
              exit();
              
              }
              
              
                      }
                        }
              Last edited by riderz; 05.09.10, 20:11.
              ________________
              Jacques
              jacques@gw-designs.co.za
              http://coding.biz.tm
              Come join and lets make it a place to learn all the noobies how to code
              __________________

              NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

              Comment


                #8
                sorry it was there:
                PHP Code:
                ////////////////////////////////////////RATE USER

                else if($action=="rateuser")

                {

                  
                addonline(getuid_sid($sid),"Rating a Photo","");
                     include(
                "css.inc.php");

                $rate $_POST["rate"];

                  
                $comment $_POST["comment"];



                  
                $uid1 getuid_sid($sid);

                  
                $item mysql_fetch_array(mysql_query("SELECT uid, id, imageurl, sex FROM usergallery WHERE uid='".$whoimage."'"));



                  
                $rated mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$whoimage."'"));


                   
                $tolog false;
                  if(
                canratephoto($uid1$item[0]) and ($rated[0]==0))

                  {

                   echo 
                "<p align=\"left\">";

                   
                $uid getuid_sid($sid);

                   if((
                strlen($comment))>1){

                   
                $resmysql_query("INSERT INTO usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='Y'");

                   }else

                   if((
                strlen($comment))<2){

                   
                $resmysql_query("INSERT INTO usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='N'");

                   }



                   if((
                $res) and ((strlen($comment))>1)){

                     echo 
                "<img src=\"../images/ok.gif\" alt=\"o\"/>Rated Successfully<br/>";

                     echo 
                "<img src=\"../images/ok.gif\" alt=\"o\"/>Comments added Successfully<br/>";
                       
                $tolog true;
                         }else

                   if((
                $res) and ((strlen($comment))<2)){



                     echo 
                "<img src=\"../images/ok.gif\" alt=\"o\"/>Rated Successfully<br/>";

                     echo 
                "<img src=\"../images/notok.gif\" alt=\"x\"/>No Comments were added<br/>";

                    
                $tolog true;
                         }else{

                     echo 
                "<img src=\"../images/notok.gif\" alt=\"x\"/>Rated unsuccessfully<br/>";

                     echo 
                "<img src=\"../images/notok.gif\" alt=\"x\"/>No Comments were added<br/>";

                   }

                  echo 
                "</p>";

                     if(
                $tolog)
                {
                 
                $uid getnick_uid($who);

                $email mysql_fetch_array(mysql_query("SELECT email FROM rmembers WHERE id='".$item[0]."'"));
                $subj "Reply";
                  
                $uid getuid_sid($sid);
                $msg "\n Name: ".$uid." \n made a comment on ur photo.  ".$reply."<b></b>";
                $subj "Comment";
                $headers 'Retrivewap: retrivewap.co.za' "\r\n" .
                'jacques@waplive.co.za' "\r\n" .
                mail($email[0], $subj$msg$headers);
                }else{

                  echo 
                "<p><small>";

                  echo 
                "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

                  echo 
                " > ";

                  echo 
                "<a href=\"gallery2.php?action=main&amp;sid=$sid\">Photo gallery</a>";

                  echo 
                " > ";

                  echo 
                "Rating a Photo";

                  echo 
                "</small></p>";


                exit();

                }


                        }
                          } 

                Comment


                  #9
                  it still dnt detect the email of the users
                  ________________
                  Jacques
                  jacques@gw-designs.co.za
                  http://coding.biz.tm
                  Come join and lets make it a place to learn all the noobies how to code
                  __________________

                  NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

                  Comment

                  Working...
                  X