Results 1 to 2 of 2

Thread: Order Tracking Service

  1. #1
    Join Date
    Jun 2007
    Location
    Manchester, UK
    Posts
    1

    Order Tracking Service

    Hi

    I want to put an order tracking service on my website so that customers can type in their ref number and check the status of their order. My server uses PHP with a MySQL database.

    I don't know PHP or MySQL so I'm looking for some code and database setup instructions/examples.

    Thanks in advance for your help!

  2. #2
    Join Date
    Jun 2007
    Posts
    3
    I'm assuming you have php and mysql up and running. 1. Open mysql, follow this syntax: http://dev.mysql.com/doc/refman/5.0/...e-database.htm 2. do the same for create table (link for syntax is on the right, 2 items down)

    here is a db_login script for php to access the database
    your username maybe be blank as well unless you change it:
    Code:
    <?php 
    
    //include this file to connect to the resource directory database.
    
    $userName = 'bob';
    $password = '';
    $host = 'localhost';
    $database = 'database_name';
    
    $link = mysql_connect($host, $userName, $password)
       or die('FATAL Error:: Unable to reach database server');
       
       mysql_select_db($database) or die('FATAL Error:: Unable to access database');
    ?>
    you can either include that at the top of each page or make it its own .php page then include this line at the top of each page making queries on the database:
    Code:
    <?php  require_once ('db_login.php'); ?>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •