Virajsinh

Update.php

Apr 2nd, 2018
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2.  
  3.     $uname = $_POST['username'];
  4.     $mail = $_POST['mail'];
  5.    
  6.     //MySQLi Query
  7.     $con = mysqli_connect("localhost","root","","mscit");
  8.    
  9.     if(!$con)
  10.     {
  11.         die("Error :".mysqli_error());
  12.     }
  13.     else
  14.     {
  15.         //none
  16.     }
  17.    
  18.     //delete from login where username=7842;
  19.     $dbq = "update login set email='$mail' where username='$uname'";
  20.  
  21.     mysqli_query($con, $dbq);
  22.    
  23.     echo "<p align='center'> Record Updated.";
  24.    
  25.     //echo "Record Updated : ".mysql_affected_rows($con);
  26.  
  27. ?>
Add Comment
Please, Sign In to add comment