Jump to content

mikebyrne

Members
  • Posts

    780
  • Joined

  • Last visited

Everything posted by mikebyrne

  1. Im using Navicat and for the life of me I cant see how to create a table from the SQL
  2. Ok I've deleted the table and set it up again CREATE TABLE `product` ( `Producttype` varchar(4) collate latin1_general_ci default NULL, `ProductName` varchar(80) collate latin1_general_ci default NULL, `ProductNo` decimal(50,0) NOT NULL, `Stockamount` decimal(5,0) default NULL, `Display` decimal(3,0) default NULL, `Description` varchar(1000) collate latin1_general_ci default NULL, `Price` decimal(6,2) default NULL, `Image` varchar(50) collate latin1_general_ci default NULL, `Imgae2` varchar(50) collate latin1_general_ci default NULL, PRIMARY KEY (`ProductNo`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; But the only details to pass to the DB is ProductNo
  3. I have it as `ProductNo` decimal(7,0) NOT NULL default '1' I've tried to set the auto increment but it doesnt seem to work
  4. Sorry yes this is add.php. When I press submit all that seems to go in is the Product number field. I have to keep deleting the 0 in the ProductNo field in order to get it to process
  5. Yeah i know its to do with the ProductNo field having 0 when I press submit but no other details are being passed to the table
  6. Im not sure why the page wont load it just shows Duplicate entry '0' for key 1 on the page
  7. the sql for the table is CREATE TABLE `product` ( `Producttype` varchar(4) collate latin1_general_ci default NULL, `ProductNo` decimal(7,0) NOT NULL default '0', `ProductName` varchar(80) collate latin1_general_ci default NULL, `Stockamount` decimal(5,0) default NULL, `Display` varchar(3) collate latin1_general_ci default NULL, `Description` varchar(10000) collate latin1_general_ci default NULL, `Price` decimal(6,2) default NULL, `Image` varchar(50) collate latin1_general_ci default NULL, `Image2` varchar(50) collate latin1_general_ci default NULL, PRIMARY KEY (`ProductNo`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
  8. Ive initalized them but still getting the error <form action="add.php" onsubmit="return valid()" method="post"> <?PHP require_once("adminconnect.php"); $ProductNo = mysql_real_escape_string(trim($_POST['ProductNo'])); $ProductName = mysql_real_escape_string(trim($_POST['ProductName'])); $Description = mysql_real_escape_string(trim($_POST['Description'])); $Price = mysql_real_escape_string(trim($_POST['Price'])); $tbl_name="Product"; $sql="INSERT INTO `$tbl_name` (`ProductNo`, `ProductName`, `Description`, `Price`) VALUES ('$ProductNo', '$ProductName', '$Description', '$Price')"; $result = mysql_query($sql) or die (mysql_error()); ?>
  9. Im trying to create a form to allow users to enter new products to the database but when the form loads I get an Duplicate entry '0' for key 1 error my code is: <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>e-commerce admin page sample |item</title> <link href="../Admin_files/admin.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript" src="../includes/wrapper.js"></script> </head> <body> <div id="Box"> <div id="logoBox"><a href="http://www.btrax.com/" target="_blank"><img src="../Admin_files/logo.gif" width="51" height="125" border="0" /></a></div> <div id="contentBox"> <form action="add.php" onsubmit="return valid()" method="post"> <?PHP require_once("adminconnect.php"); $tbl_name="product"; $sql="INSERT INTO `$tbl_name` (`ProductNo`, `ProductName`, `Description`, `Price`) VALUES ('$ProductNo', '$ProductName', '$Description', '$Price')"; $result = mysql_query($sql) or die (mysql_error()); ?> <!-- logo start --> <div id="container"> <div class="padTop28"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- logo finish --> <!-- menu start --> <div id="container"> <div id="menu1"> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/start.php" class="black">Order</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/sales.php" class="black">Sales</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/list.php" class="black">Edit item</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/postage.php" class="black">Postage fee</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/adminreg.php" class="black">Add User</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_on"><!-- --></div> <div id="menu_text_on"><a href="../admin_files/add.php" class="black_on">Add Product</a></div> <div id="menu_space1"><!-- --></div> </div> <!-- --> <!-- Double Space undernath CD --> <div class="clr"><!-- --></div> <div class="clr"><!-- --></div> <div class="padTop5"><!-- --></div> <div class="clr"><!-- --></div> <div class="clr"><!-- --></div> <div class="clr"><!-- --></div> <div class="padTop5"><!-- --></div> <div class="clr"><!-- --></div> <!-- menu finish --> <!-- top start --> <div id="container"> <div id="line"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div id="containerBg1"> <div class="padTop15"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div id="titleText">EDIT ITEM</div> <div class="clr"> <!-- --> </div> <div class="padTop15"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- top finish --> <!-- data title start --> <div id="containerBg2"> <div class="padTop2"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="titleBox"> <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="290" align="left">IMAGE</td> <td width="527">DETAIL</td> </tr> </table> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data title finish --> <!-- 1px space start --> <div id="containerBg1"> <div class="padTop1"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- 1px space finish --> <!-- data top start --> <div id="containerBg3"> <div class="padTop1"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data top finish --> <!-- data content start --> <div id="containerBg4"> <div class="padTop15"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="padTop1"> <!-- data Left start --> <div class="editLeft"> <!-- picture1 start --> <div class="editLeftBox">PICTURE 1:</div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"><img src="<?php echo $row['Image'];?>" alt="pic1" width="150" height="200" /></div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"> <input type="file" name="uploadfile" class="newsUpFile"> </div> <div class="clr"> <!-- --> </div> <!-- picture1 finish --> <div class="padTop50"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- picture2 start --> <div class="editLeftBox">PICTURE 2:</div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"><img src="<?php echo $row['Image2'];?>" alt="pic1" width="150" height="200" /></div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"> <input type="file" name="uploadfile" class="newsUpFile"> </div> <div class="clr"> <!-- --> </div> <!-- picture2 finish --> </div> <!-- data Left finish --> <!-- data Right start --> <div class="editRight"> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Product No:</div> <div class="editRightForm"> <!--MAKES PRODUCT NO READ ONLY--> <input type="text" class="itemEditForm02" name="ProductNo" value="<?php echo $row['ProductNo'];?>" readonly="readonly" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Product Name:</div> <div class="editRightForm"> <input name="0" type="text" class="itemEditForm02" name="ProductName" value="<?php echo $row['ProductName'];?>" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Description:</div> <div class="editRightForm"> <textarea type="text" class="itemEditForm03" name="something" ><?php echo $row['Description'];?></textarea> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Remarks:</div> <div class="editRightForm"> <input type="text" class="itemEditForm02" name="0" value="" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Price:</div> <div class="editRightForm"> <div class="editItemPrice1">€</div> <div class="editItemPrice2"> <input type="text" class="itemEditForm04" name="0" value="<?php echo $row['Price'];?>" /> </div> <div class="clr"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Sale:</div> <div class="editRightForm"> <div class="editRadioLink1"> <input name="link" type="radio" value="yes" /> </div> <div class="editRadioLink2">Yes</div> <div class="editRadioLink3"> <input name="link" type="radio" value="no" checked="checked" /> </div> <div class="editRadioLink4">No - sale price: € </div> <div class="editRadioLink5"> <input type="text" class="newsEditForm02" name="0" value="0" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Display:</div> <div class="editRightForm"> <div class="editRadio1"> <input name="display" type="radio" value="yes" checked="checked" /> </div> <div class="editRadio2">show</div> <div class="editRadio3"> <input name="display" type="radio" value="no" /> </div> <div class="editRadio4">hide</div> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop75"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <!-- data Right finish --> </div> <div class="clr"> <!-- --> </div> <div class="padTop11"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div id="dottedIn"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <!-- btn start --> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div id="btn"> <input id="btnL" type="submit" name="Submit" value="" /> <div id="btnSpace"> <!-- --> </div> <div id="btnR"><img src="../Admin_files/btn_clear.gif" width="73" height="23" /></div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- btn finish --> </div> <div class="clr"> <!-- --> </div> <!-- data content finish --> <!-- data btm start --> <div id="containerBg3"> <div class="padTop1"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data btm finish --> </form> </div> <!-- btm start --> <div id="containerBg1"> <div class="padTop15"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div id="container"> <div id="line"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- btm finish --> </div> </body> </html>
  10. I viewd the html page source and noticed this Table 'admin.products' doesn't exist UNBELIVABLE!!! 2 days pulling my hair out and my SQL was $query = "SELECT ProductName FROM Products"; instead of $query = "SELECT ProductName FROM Product"; Thanks for the help guys
  11. Still cant get the box to autofill with my data, cant figure out why as Im getting no error and the code looks ok to me
  12. My complete code now is: <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Admin Page | sales</title> <link href="../Admin_files/admin.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript" src="../includes/wrapper.js"></script> </head> <body> <div id="Box"> <div id="logoBox"><a href="http://www.btrax.com/" target="_blank"><img src="../images/logo.gif" width="51" height="125" border="0" /></a></div> <div id="contentBox"> <form> <!-- logo start --> <div id="container"> <div class="padTop28"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <!-- logo finish --> <!-- menu start --> <div id="container"> <div id="menu1"> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/start.php" class="black">Order</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_on"><!-- --></div> <div id="menu_text_on"><a href="../admin_files/sales.php" class="black_on">Sales</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/list.php" class="black">Edit item</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/sales.php" class="black">Postage fee</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/adminreg.php" class="black">Add User</a></div> <div id="menu_space1"><!-- --></div> <div id="menu_off"><!-- --></div> <div id="menu_text_off"><a href="../admin_files/add.php" class="black">Add Product</a></div> <div id="menu_space1"><!-- --></div> </div> <div class="clr"><!-- --></div> <div class="clr"><!-- --></div> <div class="padTop5"><!-- --></div> <div class="clr"><!-- --></div> <div id="dotted"><!-- --></div> <div class="clr"><!-- --></div> <div class="padTop5"><!-- --></div> <div class="clr"><!-- --></div> <div id="menu2"> <div id="menu_hide"><!-- --></div> <div id="menu_text_off" class="textWhite">order</div> <div id="menu_space1"><!-- --></div> <div id="menu_hide"><!-- --></div> <div id="menu_text_off"><a href="sales.php" class="black">Sales</a></div> <div id="menu_space2"><!-- --></div> <div id="menu_text_on"><a href="sales_search.php" class="black_on">Sales search</a></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <div class="padTop38"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <!-- menu finish --> <!-- top start --> <div id="container"> <div id="line"><!-- --></div> </div> <div class="clr"><!-- --></div> <div id="containerBg1"> <div class="padTop15"><!-- --></div> <div class="clr"><!-- --></div> <div id="titleText">sales search</div> <div class="clr"><!-- --></div> <div class="padTop15"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <!-- top finish --> <!-- 1px space start --> <div id="containerBg1"> <div class="padTop1"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <!-- 1px space finish --> <!-- data top start --> <div id="containerBg3"> <div class="padTop1"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <!-- data top finish --> <!-- data content start --> <div id="containerBg4"> <!-- data start --> <div class="padTop11"><!-- --></div> <div class="clr"><!-- --></div> <div class="padTop1"> <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="55">month</td> <td width="762"> <select name="month" class="000"> <option value="">------</option> <option value="2006-06" >2006-06</option> <option value="2006-05" >2006-05</option> <option value="2006-04" >2006-04</option> <option value="2006-03" >2006-03</option> <option value="2006-02" >2006-02</option> <option value="2006-01" >2006-01</option> <option value="2005-12" >2005-12</option> </select> </td> </tr> </table> </div> <div class="clr"><!-- --></div> <div class="padTop11"><!-- --></div> <div class="clr"><!-- --></div> <!-- data finish --> <!-- data start --> <div class="padTop1"> <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="55">year</td> <td width="762"> <select name="year" class=""> <option value="">------</option> <option value="2006" >2006</option> <option value="2005" >2005</option> </select> </td> </tr> </table> </div> <!-- data finish --> <!-- line start --> <div class="clr"><!-- --></div> <div class="padTop11"><!-- --></div> <div class="clr"><!-- --></div> <div id="dottedIn"><!-- --></div> <div class="clr"><!-- --></div> <div id="sales_text_and">and / or</div> <div id="dottedIn"><!-- --></div> <div class="clr"><!-- --></div> <div class="padTop11"><!-- --></div> <div class="clr"><!-- --></div> <!-- line finish --> <!-- data start --> <div class="padTop1"> <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="55">product</td> <td width="762"> <select name="month"> <option value="">------</option> <?PHP include('adminconnect.php'); $query = "SELECT ProductName FROM Products"; $result = mysql_query($query) or die (mysql_error()); $i=1; while ($row = mysql_fetch_array($result)) { echo "<option value=".$i.">".$row['ProductName']."</option>"; $i++; } ?> </select> </td> </tr> </table> </div> <div class="clr"><!-- --></div> <div class="padTop11"><!-- --></div> <div class="clr"><!-- --></div> <div id="dottedIn"><!-- --></div> <div class="clr"><!-- --></div> <!-- data finish --> <!-- btn start --> <div class="padTop16"><!-- --></div> <div class="clr"><!-- --></div> <div id="btn"><a href="sales_search_result.php"><img src="../images/btn_search.gif" alt="search" width="73" height="23" border="0" /></a></div> <div class="clr"><!-- --></div> <div class="padTop16"><!-- --></div> <div class="clr"><!-- --></div> <!-- btn finish --> </div> <div class="clr"><!-- --></div> <!-- data content finish --> <!-- data btm start --> <div id="containerBg3"> <div class="padTop1"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <!-- data btm finish --> <!-- btm start --> <div id="containerBg1"> <div class="padTop15"><!-- --></div> <div class="clr"><!-- --></div> </div> <div class="clr"><!-- --></div> <div id="container"> <div id="line"><!-- --></div> </div> <div class="clr"><!-- --></div> <div class="padTop16"><!-- --></div> <div class="clr"><!-- --></div> <!-- btm finish --> </form> </div> </div> </body> </html>
  13. No, that still doesnt change things. I had that previously but must have changed it back to my original. Just tried it your way again and it still doesnt fill the box
  14. No thats still the same. Im running out of ideas! Would it help if i post my complete code?
  15. No that still doesnt fill the box and error reporting is turned on. Its really confusing me
  16. I just cant see why the box isnt filling up. The code looks fine to me and I'm not getting any errors. Its doing my head in!! <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="55">product</td> <td width="762"> <select name="month"> <option value="">------</option> <?PHP include('adminconnect.php'); $query = "SELECT ProductName FROM Products"; $result = mysql_query($query) or die (mysql_error()); $i=1; while ($row = mysql_fetch_array($query)) { echo "<option value=\"$i\" >".$row['ProductName']."</option>"; $i++; } ?> </select> </td> </tr> </table>
  17. If I could get the listbox to fill and my one form to submit i'll have it done
  18. Thanks again. The list is still not being filled for some reason. <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="55">product</td> <td width="762"> <select name="month"> <option value="">------</option> <?PHP include('adminconnect.php'); $query = "SELECT ProductName FROM Products"; $result = mysql_query($query) or die (mysql_error()); $i=1; while ($row = mysql_fetch_array($query)) { echo "<option value=\"$i\" >".$row['ProductName']."</option>"; $i++; } ?> </select> </td> </tr> </table> My sql for the db is: CREATE TABLE `product` ( `Producttype` varchar(4) collate latin1_general_ci default NULL, `ProductNo` decimal(7,0) NOT NULL default '0', `ProductName` varchar(80) collate latin1_general_ci default NULL, `Stockamount` decimal(5,0) default NULL, `Display` varchar(3) collate latin1_general_ci default NULL, `Description` varchar(10000) collate latin1_general_ci default NULL, `Price` decimal(6,2) default NULL, `Image` varchar(50) collate latin1_general_ci default NULL, `Image2` varchar(50) collate latin1_general_ci default NULL, PRIMARY KEY (`ProductNo`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
  19. Good spot! Now I'm getting Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\Admin_files\sales_search.php on line 208 Line 208 is: $result = mysql_query($query) or die (mysql_error());
  20. My code <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td width="33"> </td> <td width="55">product</td> <td width="762"> <select name="month"> <option value="">------</option> <?PHP include('adminconnect.php'); $query = "SELECT ProductName FROM Products; $result = mysql_query($query) or die (mysql_error()); $i=1; while ($row = mysql_fetch_array($query)) { echo "<option value=\"$i\" >".$row['ProductName']."</option>"; $i++; } ?> </select> </td> </tr> </table> Is giving me the error Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\Admin_files\sales_search.php on line 212 Line 212 is: echo "<option value=\"$i\" >".$row['ProductName']."</option>";
  21. When i press the submit button Im getting the error Duplicate entry '0' for key 1 even if the fields are all blank
  22. Thanks Now Imgetting the error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' ProductName, Description, Price,)VALUES('', '', '', '',)' at line 1
×
×
  • 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.