Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['look']))      $look=$_POST['look'];
  3. else      $look="";
  4. ?>
  5.     Your field was :
  6.     <b><?php echo $_POST['look'];  ?> </b>
  7.     <br/><br/>
  8. <?php
  9.  
  10. $db = mysql_connect('localhost', 'xxxxxx', 'xxxxxxx')  or die('Connection error '.mysql_error());
  11.  
  12. mysql_select_db('aftersun_cartouches',$db);
  13.  
  14. $result = mysql_query('SELECT * FROM catouches WHERE "Modeles" LIKE '%$look%'');
  15.  
  16. while ($data = mysql_fetch_array($result))
  17. {
  18. echo $data['No_Cartouches'];
  19. }
  20.  
  21. mysql_free_result($query);
  22. mysql_close();
  23. ?>
  24.  
  25. <form method="POST">
  26.     <input name="look" type="text"/>
  27.     <input name="valider" type="submit" value="OK"/>
  28. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement