Jump to content

deep958

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by deep958

  1. i changed mysqli to mysql but now i need to change a lot more things . its very time consuming and hectic . is there any other way to use mysqli by changing server ??
  2. it means i have to change just mysqli to mysql at every palce . is there any other thing that i have to change ??
  3. yesterday it was working but now it shows error Call to undefined function mysqli_connect()
  4. hurry! now my code runs . previous code work now . i dont know why it was not working yesterday , but today its working . Thank you krydos for helping me . you always help me but it goes into spam folder , do you know how to stop it from going into spam folder
  5. 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
  6. i removed all the spaces from $headers part but, still msg is not send
  7. 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: http://localhost/New...l&vcode=$random"; $headers="From : togetherweindia@gmail.com"; $sentmail=mail($to,$subject,$message,$headers);}
  8. 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: http://localhost/New%20folder/confirmed.php?email=$email&vcode=$random"; $headers="From : togetherweindia@gmail.com"; $sentmail=mail($to,$subject,$message,$headers); }
  9. I changed $from to $headers, but still it's not working
  10. 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.\
  11. 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: http://localhost/New%20folder/confirmed.php?email=$email&vcode=$random"; $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
  12. 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,$ ; $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,$ ; $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
  13. i am from johnny server and my cron job is also not working . plz help me
  14. there is no error message and no work is performed by it . but when i execute it by my own then it works fine
  15. i dont know anything about wolstech sql , even i heared about it first time . i am using mysql in my php file . can i use wolstech sql in my file and can i uploa it on phpmyadmin
  16. i had already done this but when 100 users watch same videos simultaneously then this query will run simultaneously , which will cause loss in data . eg if views value is 50 initially then it should become 150 but may be due to executing simultaneously there will be update loss how can i prevent that loss
  17. i want to update my view table data by 1 whenever a user watch a video . this causes update update loss in my database . plz suggest me some method to perform my work correctly
  18. 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
  19. yeah , but first i check whether the filled entries are correct or not . and if entries are correct then starts a session . how should i modify my code for this purpose so that no error occur??
  20. 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
×
×
  • Create New...