Advertisement
james168

tips.php

Jan 21st, 2018
74
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.  
  3. define('INCLUDE_CHECK',1);
  4. require "../connection.php";
  5.  
  6. if(!$_POST['img']) die("There is no such product!");
  7.  
  8. $img=mysql_real_escape_string(end(explode('/',$_POST['img'])));
  9. $postedImageExploded = explode('/', $_POST['img']);
  10. $imagePosted = end( $postedImageExploded );
  11. $img = mysql_real_escape_string($imagePosted);
  12. $row=mysql_fetch_assoc(mysql_query("SELECT * FROM tblsupply WHERE img='".$img."'"));
  13.  
  14. if(!$row) die("There is no such product!");
  15.  
  16. echo "Description: ";
  17. echo '<strong>'.$row['description'].'</strong>
  18.  
  19. <br>
  20.  
  21. Unit Cost:<strong> '.$row['unitcost'].'</strong><br>
  22. Remaining Balance:<strong> '.$row['quantity'].'</strong>
  23. <small>Drag it to your shopping cart to purchase it</small>';
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement