Jump to content

m118

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

m118's Achievements

Member

Member (2/5)

0

Reputation

  1. I am working for a company, the program i am working on is not right. Please help find the problem. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> .box1 { background:#00CC99; width:980px; height:800px; margin:20px auto;} .box2 { margin-left:60px; float:left; margin-top:30px;} </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>&#26080;&#26631;&#39064;&#25991;&#26723;</title> </head> <body> <div class="box1"> <div class="box2"> <form action="jobnew.php" method="post" > <p><strong>Kind</strong><br /> Lazer <input type="radio" name="kind" value="Laser"/> Inkjet <input type="radio" name="kind" value="Inkjet" /> </p> <p><strong>Brand</strong> <br /> <select name="brand"> <option value="Apple">Apple</option> <option value="brother">Brother</option> <option value="Canon">Canon</option> <option value="Dell">Dell</option> <option value="Epson">Epson</option> <option value="HP">HP</option> <option value="lexmark">Lexmark</option> <option value="Samsung">Samsung</option> <option value="Sharp">Sharp</option> <option value="IBM">IBM</option> <option value="Lenovo">Lenovo</option> <option value="Konica-Minolta">Konica-Minolta</option> <option value="QMS">QMS</option> <option value="okidata">okidata</option> <option value="Mita">Mita</option> <option value="Ricoh">Ricoh</option> <option value="Source technology">Source technology</option> <option value="Standard Register">Standard Register</option> <option value="Tally Genicom">Tally Genicom</option> <option value="Tektronix">Tektronix</option> <option value="Toshiba">Toshiba</option> <option value="Unisys">Unisys</option> <option value="Xerox">Xerox</option> <option value="Xerox Ink Stricks">Xerox Ink Sticks</option> <option value="kyocera">kyocera</option> <option value="Postage Meters">Postage Meters</option> </select> </p> <p><strong>PTi item#</strong><Br /> <input type="text" name="item" /> </p> <p><strong>PTI stock#</strong><br /> <input type="text" name="PTISTOCK" size="30" /> </p> <p><strong>Machine Compatibility</strong><br /> <input type="text" name="MC" size="30" /> </p> <p><strong>OEM Part#</strong><br /> <input type="text" name="OEMPART" size="30" /> </p> <p><strong>Color</strong><br /> <select name="colorful" > <option value="red" >red</option> <option value="black" >black</option> <option value="Cyan" >Cyan</option> <option value="Yellow" >Yellow</option> <option value="Magenta" >Magenta</option> <option value="Tri-color">Tri-color</option> <option value="Photo">Photo</option> <option value="Photo Cyan">Photo Cyan</option> <option value="Photo Gray">Photo Grey</option> <option value="Photoblack">Photoblack</option> <option value="Matte Black">Matte Black</option> <option value="Lt.Cyan">Lt.Cyan</option> <option value="Lt.Magenta">Lt.Magenta</option> <option value="Light Cyan">Light Cyan</option> <option value="Light Magenta">Light Magenta</option> <option value="Gray">Gray</option> <option value="Photo Magenta">Photo Magenta</option> <option value="Black/Color">Black/Color</option> <option value="CMKYLtCLtM">CMKYLtCLtM</option> <option value="blue">blue</option> <option value="color">color</option> <option value="Photo-Gray">Photo-Gray</option> <option value="white">white</option> <option value="Photo Tri-color">Photo Tri-color</option> <option value="color Photo">color Photo</option> <option value="Green">Green</option> </select> </p> <p><strong>OEM Price</strong><br /> <input type="text" name="OEMPRICE" size="30" /> </p> <p><strong>Compatibility Price</strong><br /> <input type="text" name="CP" size="30" /> </p> <p><strong>Picture</strong><br /> <input type="file" name="dd" /> </p> <p> <input type="submit" value="submit"> </p> <p></p> </form> </div> </div> <?php $host="localhost"; $user="root"; $password=""; $tianjin="pti"; $tab= "table"; $kind=$_POST['kind']; $brand=$_POST['brand']; $ptistork=$_POST['PTISTOCK']; $item=$_POST['item']; $compatibility=$_POST['MC']; $OEM=$_POST['OEMPART']; $color=$_POST['colorful']; $oemprice=$_POST['OEMPRICE']; $comp=$_POST['CP']; $image=$_POST['dd']; $connection=mysql_connect($host,$user,$password)or die (mysql_error()); echo "1"; $db=mysql_select_db($tianjin,$connection)or die (mysql_error()); echo "2"; $file=$_FILES['dd']['tmp_name']; $insert="INSERT INTO $tab (kind,brand,ptiitem,stock,compatibility,oempart,color,oemprice,comprice,picture) VALUES ('$kind','$brand','$item','$ptistork','$compatibility','$OEM','$color','$oemprice','$comp','$image')"; $result=mysql_query($insert,$connection) or die (mysql_error()); echo "you win " ; ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.