Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Etape Suivi Commande</title>
- </head>
- <body>
- <?php
- $code = $_GET["code"];
- // Connect to database server
- mysql_connect("Localhost", "ID", "Password") or die (mysql_error ());
- // Select database
- mysql_select_db("Base") or die(mysql_error());
- // SQL query
- $strSQL = "SELECT * FROM ps_orders WHERE reference = $code";
- // Execute the query (the recordset $rs contains the result)
- $rs = mysql_query($strSQL);
- // Loop the recordset $rs
- while($row = mysql_fetch_array($rs)) {
- // Write the value of the column FirstName and BirthDate
- if (empty($reference)) {
- echo 'OK|SON|';
- echo $row['current_state'];
- echo '|SON|FIN|';}
- else {
- echo 'KO';}
- }
- // Close the database connection
- mysql_close();
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement