Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "dbirkemalm.com.mysql";
- $username = "dbirkemalm_com";
- $password ="8ejxQ4Pn";
- $db_name = "dbirkemalm_com";
- $ip_table = 'ips';
- $vote_table = 'votes';
- $ip = $_SERVER['REMOTE_ADDR'];
- $vote = $_GET['id'];
- mysql_connect("$host", "$username", "$password") or die ("cannot connect");
- mysql_select_db("$db_name") or die ("cannot select DB");
- $iptestq = sprintf("SELECT * FROM $ip_table");
- $result = mysql_query($iptestq);
- if (!$result) {
- echo "Could not successfully run query ($iptestq) from DB: " . mysql_error();
- exit;
- }
- if (mysql_num_rows($result)==0){
- echo "No rows";
- exit;
- }
- while ($row = mysql_fetch_assoc($result)){
- echo $row['$ip'];
- }
- mysql_free_result($result);
- //echo $_GET['id'];
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement