Advertisement
Guest User

Untitled

a guest
Oct 15th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <title>Etape Suivi Commande</title>
  5.  
  6. </head>
  7. <body>
  8.  
  9. <?php
  10.  
  11. $code = $_GET["code"];
  12.  
  13. // Connect to database server
  14. mysql_connect("Localhost", "ID", "Password") or die (mysql_error ());
  15.  
  16. // Select database
  17. mysql_select_db("Base") or die(mysql_error());
  18.  
  19. // SQL query
  20.  
  21. $strSQL = "SELECT * FROM ps_orders WHERE reference = $code";
  22.  
  23.  
  24. // Execute the query (the recordset $rs contains the result)
  25. $rs = mysql_query($strSQL);
  26.  
  27. // Loop the recordset $rs
  28. while($row = mysql_fetch_array($rs)) {
  29.  
  30. // Write the value of the column FirstName and BirthDate
  31. if (empty($reference)) {
  32. echo 'OK|SON|';
  33. echo $row['current_state'];
  34. echo '|SON|FIN|';}
  35.  
  36. else {
  37. echo 'KO';}
  38. }
  39.  
  40.  
  41.  
  42. // Close the database connection
  43. mysql_close();
  44. ?>
  45.  
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement