"; PRINT "Insert New Transaction"; PRINT ""; /* declare some relevant variables */ $dbname = "example"; /* MySQL table for customers */ $customer = "customer"; /* MySQL table for products */ $product = "product"; /* make connection to database */ MYSQL_CONNECT() OR DIE("Unable to connect to database server"); @mysql_select_db("$dbname") or die("Unable to select database"); PRINT "
"; PRINT "Insert the data for a new transaction:"; PRINT "

"; PRINT ""; PRINT ""; PRINT ""; PRINT ""; PRINT "
"; PRINT "
"; /* Select information from the customer table */ $query = "SELECT * FROM $customer"; $result = MYSQL_QUERY($query); PRINT "Select a customer:"; PRINT "
"; PRINT ""; PRINT "

"; /* Select information from the product table */ $query = "SELECT * FROM $product"; $result = MYSQL_QUERY($query); PRINT "Select a product:"; PRINT "
"; PRINT ""; PRINT "

"; PRINT "Date of the transaction:"; PRINT "
"; PRINT ""; PRINT "

"; PRINT "Quantity:"; PRINT "
"; PRINT ""; PRINT "

"; PRINT ""; PRINT "

"; PRINT "
"; PRINT "

"; PRINT "Back"; PRINT ""; PRINT ""; /* Close the database connection */ MYSQL_CLOSE(); ?>