Advertisement
Bille

Simple lookup

Dec 11th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2. if (isset($_GET['key']) && is_numeric($_GET['key']))
  3. {      
  4.     $sql = "SELECT value FROM database where key=".$_GET['key'];
  5.     $result = $db->sql_query($sql) or halt($sql);
  6.    
  7.     if ($data = $db->sql_fetchrow($result))
  8.     {
  9.         echo $data['value'];
  10.     }
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement