Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. header('Content-type: text/html; charset=utf-8');
  3.  
  4. $host='localhost';
  5. $user='username';
  6. $password='password';
  7. $dbname='racheaqui';
  8.  
  9. $connection=mysql_connect('localhost:/var/run/mysqld/mysqld.sock',$user,$password) or die ("connection failed");
  10.  
  11. mysql_select_db($dbname, $connection);
  12.  
  13. $query = "SELECT * FROM store WHERE date >= NOW() - INTERVAL 20 MINUTE;";
  14.  
  15. $result=mysql_query($query, $conexao);
  16.  
  17. if ($result){
  18.  
  19. while($row = mysql_fetch_assoc($result)){
  20. $email=$row['email_contact'];
  21. $name=$row['name'];
  22. $phone=$row['phone_contact'];
  23. }
  24. }
  25.  
  26. #if (!empty($name)) {
  27. print_r("The user ".$name." with phone ".$phone." and e-mail: ".$email." has created an account in the system.n");
  28. mysql_close($connection);
  29. #}
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement