Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. enter code here
  2.  
  3. $servername = "localhost";
  4. $username = "root";
  5. $password = "";
  6. $dbname = "email";
  7.  
  8. $con=mysqli_connect($servername,$username,$password, $dbname);
  9. // Check connection
  10. if (mysqli_connect_errno())
  11. {
  12. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  13. }
  14.  
  15. $sql="SELECT 'Trading' FROM 'trading1' WHERE Trading = ('$_POST[kiran]')";
  16.  
  17. if ($result=mysqli_query($con,$sql))
  18. {
  19. // Return the number of rows in result set
  20. $rowcount=mysqli_num_rows($result);
  21. printf("Result set has %d rows.n",$rowcount);
  22. // Free result set
  23. mysqli_free_result($result);
  24. }
  25.  
  26. mysqli_close($con);"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement