Jump to content

deep958

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by deep958

  1. In $headers, you r using heliohost mail account, but I want my Gmail account in that place also.
    Thanks krydos, you r trying to solve my problem.

     

     

     

    $to = "divyansh.agg15@gmail.com";
    $subject = "[Together We] Activate your account";
    $message = "Hello world!";
    $headers = "From: deep958@togetherwe.heliohost.org\r\n";
    $sentmail= mail($to,$subject,$message,$headers);

     

     

     

    i used this code but still not working

  2. i want to use gmail to send mail and also for receiving mails , but my code doesnt work .

    this is my code

     

    if($status){
    $to="$email";
    $subject="[Together We] Activate your account";
    $message="Hello $username !
    Please, confirm your registration by clicking link .Link is valid only for 1 day.
    Click to activate:
    $headers="From : togetherweindia@gmail.com";
    $sentmail=mail($to,$subject,$message,$headers);
    }
  3. i used this site for my mail function . by checking status , its showing mail is send but i didnt receive any mail .

    am i need to change some heliohost settings??



    i got this error while sending mail

     

     

    ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes: SMTP error from remote mail server after end of data: 550-5.7.1 [64.62.211.131 11] Our system has detected that this message is\n550-5.7.1 not RFC 5322 compliant:\n550-5.7.1 'From' header is missing.\

  4. i want to send email as user signup on my website . i use php code mail() function for this . but i dont know the settings of heliohost for that . plz help me

     

     

    this is my php code :

     

    if($status){
    $to="$email";
    $subject="[Together We] Activate your account";
    $message="Hello $username !
    Please, confirm your registration by clicking link .Link is valid only for 1 day.
    Click to activate:
    $from="From : Together We <no-reply@togetherwe.heliohost.org>";
    $sentmail=mail($to,$subject,$message,$from);
    }

     

     

     

     

    I want to use my gmail account for sending and receiving emails because i dont know email properties of heliohost

  5. my sql querry is this
    <?php
    $con=mysqli_connect("localhost","root","");
    mysqli_select_db($con,"together");
    $email=$_POST["email"];
    $id=$_POST["id"];
    $result="";
    // if email doesnt exit in watchv table
    $aresult=mysqli_query($con,"select * from watchv where email = '$email'");
    $anum=mysqli_num_rows($aresult);
    if($anum==0)
    {
    mysqli_query($con,"insert into watchv(email) values ('$email')");
    $aresult=mysqli_query($con,"select * from watchv where email = '$email'");
    $anum=mysqli_num_rows($aresult);
    }
    $b="select * from watchv where email= '$email'";
    $bresult=mysqli_query($con,$ B);
    $brow=mysqli_fetch_array($bresult);
    $z="id".$id;
    $bid=$brow[$z];
    if($bid==0)
    {
    $a="update watchv set $z='$id' where email='$email'";
    $status=mysqli_query($con,$a);
    $a="update video set views=views+1 where id='$id'";
    $status=mysqli_query($con,$a);
    $b="select * from money where email= '$email'";
    $bresult=mysqli_query($con,$ B);
    $bnum=mysqli_num_rows($bresult);
    if($bnum==0)
    {
    mysqli_query($con,"insert into money values('$email','5')");
    }
    else{
    mysqli_query($con,"update money set wmoney=wmoney+5 where email='$email'");
    }
    }
    elseif($bid==$id)
    {
    $a="update video set views=views+1 where id='$id'";
    $status=mysqli_query($con,$a);
    }
    ?>

     

     

     

    blue color query are for update

    what i have to change in it to prevent update loss

  6. i make my cron job file in php code and upload it . but it doesnt work

    my cron job file is this :

     

     

    <?php
    $con=mysqli_connect("localhost","name","pass");
    mysqli_select_db($con,"table");
    $t=time();
    $a=mysqli_query($con,"select * from signup");
    $anum=mysqli_num_rows($a);
    for($i=1;$i<=$anum;$i++)
    {
    $arow=mysqli_fetch_array($a);
    $avalid=$arow['valid'];
    $email=$arow['email'];
    if($avalid<$t)
    {
    mysqli_query($con,"delete from signup where email='$email'");
    }
    }
    ?>

     

     

     

    plz help me to solve my problem

  7. when i execute code on my localhost and on 000webhost then it works fine but shows error on this host .

    my php file's php code is this

     

    <?php
    // define variables and set to empty values
      $email = $password = "";
     $errors = array();
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
      
           $con=mysqli_connect("localhost","deep958","<removed>");
      mysqli_select_db($con,"deep958_togetherwe");
      
      
      
      if (empty($_POST["email"])) {
        $errors['email']  = "Email is required";
      } else {
        $email = test_input($_POST["email"]);
        // check if e-mail address is well-formed
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
              $errors['email'] = "Invalid email format"; 
        }
    else{
    $a="select * from signup where email= '$email'";
       $aresult=mysqli_query($con,$a);
       $anum=mysqli_num_rows($aresult);
     
    $b="select * from login where email= '$email'";
    $bresult=mysqli_query($con,$;
    $bnum=mysqli_num_rows($bresult);
     
    if($anum==1) {$errors['email'] = "This email is not verified.Click <a href='\New folder\confirmation.php'>here</a> to verify it.";}
    elseif($bnum==0) {$errors['email'] = "This email doesn't exist. Plz click <a href='\New folder\signup.php'>here</a> to sign up";}
     
     
    }
     
      }
     
     
     
       if (empty($_POST["password"])) {
        $errors['password']  = "Password is required";
      } else {
        $password = $_POST["password"];
        // check if password is well-formed
         if (!preg_match_all('$\S*(?=\S{6,})(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])(?=\S*[\W])\S*$', $password)){
              $errors['password'] = "Invalid password"; 
        }
    else{
        $row=mysqli_fetch_array($bresult);
    $bpassword=$row['password'];
        if($password != $bpassword)
    $errors['password']= "password is incoreecrt";
    }
      }
      
     
     
      
        
       if(count($errors)==0)
    { session_start();
          $_SESSION['user']="$email";
     header("Location: /public_html/New folder/videos.php");
     exit();
    }
      
      
      
    }
     
    function test_input($data) {
      $data = trim($data);
      $data = stripslashes($data);
      $data = htmlspecialchars($data);
      return $data;
    }
     
     
     
     
    ?>
    

     

     

    and errors that it is showing is in the image

    • Like 1
×
×
  • Create New...