Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4. $dbhost = 'mysql2.000webhost.com';
  5. $dbuser = 'a1059070_Alexi';
  6. $dbpass = 'gggggggggg';
  7.  
  8.  
  9. $con=mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error Connection to MySQL');
  10.  
  11.  
  12. $dbname = 'a1059070_users';
  13.  
  14. mysql_select_db($dbname);
  15.  
  16.  
  17.  
  18. $id=$_SESSION['id'];
  19.  
  20. if($id == null){ die("Error, did you login?"); }
  21.  
  22.  
  23. $query = "Select * FROM users WHERE ID = '$id'";
  24. $row=mysql_fetch_assoc(mysql_query($query)) or die ('Error with the query. Contact Alexi at alexi_hill14@live.com to report.');
  25.  
  26.  
  27. $item=$row['ID'];
  28.  
  29. echo $id;
  30. echo $item;
  31.  
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement