Location: PHPKode > projects > Gsys > php/tshirt_functions.php
<?PHP
//Filename : tshirt_functions.php
//Description : Functions for adding tshirts
//Author :  Marty
//Last modified :  2006.12.20

include '../includes/auth.php';
include '../includes/db.php';


switch($_GET["cat"])
{
case "add_tshirt":
{
		 $design_by = $_POST['design_by'];
         $posted_by = $_POST['posted_by'];
         $title = $_POST['title'];
         $description = $_POST['description'];
		 $image = $_POST['image'];
		 $price = $_POST['price'];
		 



         $sql = "INSERT INTO `tshirts` (`design_id`, `date_posted`, `design_by`, `posted_by`, `title`, `description`, `image`, `price`) VALUES (NULL, NOW(), '$design_by', '$posted_by', '$title', '$description', '$image', '$price')";
         $result = mysql_query($sql,$connection) or die(mysql_error());
          
		  echo "<html>
		<head><title>T-Shirt Added Successfully</title>
		<link href=\"../includes/index.css\" rel=\"stylesheet\" type=\"text/css\"></head>
		<body class=\"body\">
<br />
<table width=\"810\" height=\"626\" border=\"0\" align=\"center\" cellpadding=\"15\">
  <tr> 
    <td height=\"128\" colspan=\"2\"><img src=\"../images/eg_banner.gif\" width=\"810\" height=\"172\"></td>
  </tr>
  <tr> 
    <td width=\"27%\" height=\"488\" valign=\"top\">"; include '../includes/nav.inc'; echo "</td>
    <td width=\"53%\" align=\"center\">Successfully added T-Shirt design for "; echo "".$title.".<br>   </td>
  </tr>
</table></body></html>";
          break;
};
};
Return current item: Gsys