Advanced Web Store Using PHP/MySQL
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
how do I checkout the items
pls anwer???
undefined index
undefined index Solution
<strong>For index Page after line 3 just replace if else code with my code </strong>
<code> $displayImages = "";
if (isset($_GET['cat'])){
if($_GET['cat'] == "juice")
$sqlSelProd = mysql_query("select * from tblproduct where prod_cat = '$_GET[cat]'") or die(mysql_error());
else if($_GET['cat'] == "junkfood")
$sqlSelProd = mysql_query("select * from tblproduct where prod_cat = '$_GET[cat]'") or die(mysql_error());
else if($_GET['cat'] == "dessert sprinkler")
$sqlSelProd = mysql_query("select * from tblproduct where prod_cat = '$_GET[cat]'") or die(mysql_error());
}
else{
$sqlSelProd = mysql_query("select * from tblproduct") or die(mysql_error());
}
</code>
This above code will solve your problem after that you get error on <strong>shoppingcart.php</strong> . After line 29 and before next comment line select code and replace with mine.....
<code>if(isset($_POST['btnUpdate']))
{
$x = 0;
//echo $_POST['txtQuan2'];
//echo $_POST['txtHoldProdId0'];
foreach($_SESSION["cart_array"] as $each_product){
$i = 0;
$quantity = $_POST['txtQuan'.$x];
$prodStock = $_POST['txtHoldQuan'.$x];
$prodAdjustId = $_POST['txtHoldProdId'.$x++];
if($quantity<1){ $quantity = 1; }
if($quantity>$prodStock){ $quantity = $prodStock; }
while(list($key,$value)=each($each_product)){
array_splice($_SESSION["cart_array"],$i-1,1,array(array("productID"=>$prodAdjustId,"quantity"=>$quantity)));
}
}
}</code>
<a href="http://www.1tech.in/" title="1TECH.IN">My Website</a> ,
If you getting any trouble regarding this project ask me at : <strong>v.ray96610[at]gmail.com</strong>
VISIT MY G+ <a href="https://plus.google.com/+VIKASROYv" title="VIKAS ROY">HERE</a>
Notice: Undefined index:
mysql error
undefined
checkout function
Add new comment
- Add new comment
- 3280 views