<?php
// --------------------
// sqlConnection.php
// November 6th, 2008
// Greg Whitworth
/**************************************************************************/
// DOCUMENT NOTES
//--------------------------------------------------------------------------
// DESCRIPTION
// -----------
// This script connects the application to the SQL Database
// DEFINING DIAGRAM
// ----------------
// • INPUT
// • PROCESS
// • OUTPUT
/**************************************************************************/
// INCLUDES
//--------------------------------------------------------------------------
include "../store/sqlConnection.php";
/**************************************************************************/
// VARIABLE DEFINITIONS
//--------------------------------------------------------------------------
$title = $_POST['title'];
$description = $_POST['description'];
$medium = $_POST['medium'];
$price = $_POST['price'];
$date = $_POST['date'];
$edition = $_POST['edition'];
$subject = $_POST['subject'];
$orientation = $_POST['orientation'];
$submit = $_POST['submit'];
$id = $_POST['id'];
$vars = array('$id', '$title', '$description', '$medium', '$price', '$date', '$edition', '$subject', '$orientation');
/**************************************************************************/
// PROCESS
//--------------------------------------------------------------------------
if(!isset($submit)) {
print "You must submit the form before proceeding <a href=\"http://www.whitworthgallery.org\">Click here to return to Whitworth Gallery</a>";
}
else {
mysql_query("UPDATE Art SET(id, title, description, medium, price, date, edition, subject, orientation) VALUES ('$id','$title','$description','$medium','$price','$date','$edition','$subject','$orientation')");
header("Location:");}
mysql_close();
/**************************************************************************/
// OUTPUT
//--------------------------------------------------------------------------
/**************************************************************************/
// CHANGE LOG
//--------------------------------------------------------------------------
// GCW - added variables and created initial document [January 12, 2009]
?>
Please help me out if you can.
Thanks - Greg

New Topic/Question
Reply




MultiQuote







|