daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Oct 15th, 2014 9 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top