Jump to content

Search the Community

Showing results for tags 'shop'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. Hello W3schools again, a problem has been showed up on my little shop project again, and some people in here might knows it still... anyways... the people that tried to help me, if you are one of them. please read on... else, well... just read ... anyways... i went to my school teacher (one of them) and asked for help, and we did solve it with some big issues he told me and pointed out for me... and that was a big help for the understanding...anyways. i came home... and now the weird part is comming... when im trying to add somfthing to my shop (the cart/session)... then its like it just wont listen, because the fun part is that it (DOES) redirects do shop.php as i told it to do in the function that i call to add the redirect... that... orr its just updating.. but seems like it redirects... anyways... here are the files of my related to the shop: (ATTACHED) and i must say, i dont really knows how to explain this... since it would be impossible to redirect without the function, and that i cannot see either on the URL... :/...so please tell me if you need more information on anything... dont knows what to tell... (NO PAGE ERRORS...) so i cannot really answer anymore questions on this problem unless you are asking me ... Hoping answers soon... Regards: rootKID EDIT: Note that the details page its just a beginning... but thinked that it would be ok to add it just in case you was wonder... lol ...
  2. Hello W3S... im having this error: (LOOK AT ATTACHED PICTURE...) and here is my shop.php code: include ("shop_undermenu.php");$catID = $_GET['cat_id'];if(!isset($catID)){$result = mysql_query ('SELECT * FROM `shop_cat` ORDER BY shop_cat_id ASC LIMIT 1');$row = mysql_fetch_assoc ($result);$catID = $row['shop_cat_id'];}$query = "SELECT * FROM shop_items WHERE FK_catID = ".$catID;$result = mysql_query($query); if(mysql_num_rows($result)>0){echo "<form action='' method='post'>";echo "<table class='shop_table_100'>";echo "<tr class='shop_tr_holder_css'>";echo "<td>Add</td>";echo "<td>Amount</td>";echo "<td>Product Name</td>";echo "<td>Price</td>";echo "<td>More Info</td>";echo "</tr>";while ($row = mysql_fetch_assoc($result)){echo "<tr>\n";echo "<td><input type='checkbox' name='check_addbox[".$row['item_id']."]' /></td>\n"; ////extra array...echo "<td><input type='text' name='amount[".$row['item_id']."]' size='1' value='1' /></td>\n"; //With extra array...echo "<td>".$row['item_name']."</td>\n";echo "<td>".$row['item_price']."</td>\n";echo "<td><a href='details.php'>Info</a></td>\n";echo "</tr>\n";}echo "</table>"; echo "<form action='' method='post'>";echo "<table class='shop_table_100'";echo "<tr>";echo "<td><input type='submit' name='add_item' id='submit' class='shop_add_submit_button' value='Update Cart' /></td>";echo "</tr>";echo "</table>";echo "</form>";}//Ending IF (Num_Rows...)else{echo "<form action='' method='post'>";echo "<table class='shop_table_100'>"; echo "<tr class='shop_tr_holder_css'>";echo "<td>ERROR!</td>";echo "</tr>"; echo "</table>";echo "</form>"; echo "<form action='' method='post'>";echo "<table class='shop_table_100'>"; echo "<tr>";echo "<td>There are no Products added yet.</td>";echo "</tr>"; echo "</table>";echo "</form>";} if(isset($_POST['add_item'])){if(!empty($_POST['check_addbox'])){ foreach($_POST['check_addbox'] as $p_id => $check) { $amount = $_POST['amount'][$p_id]; //Getting the Amount from the box... $_SESSION['cart'][$p_id] += $amount; //adding them to the session... header("location: shop.php"); }}} and that runs ok... the problem is in the shop_undermenu.php file i think... Code: <?php$under_query = "SELECT * FROM shop_cat";$under_result = mysql_query($under_query)or die(mysql_error());while($u_row = mysql_fetch_assoc($under_result)){echo "<a href='shop.php?cat_id=".$u_row['shop_cat_id']."'>".$u_row['shop_cat_name']."</a> ";}?> ideas on how to fix would be greate ... and note that im telling it to go to the First Category automaticly... but why its giving that error in the picture i dont know... i mean... i tried for fun to delete all of the SQL tables i had about the cat... (with a backup ofcourse...) but what i wish is that if there is no categories... but still products... and the products does not appear... then i wish just to show the error messeage that i was trying to like in the picture... ideas would be awsome... thanks W3S... Regards: rootKID -> Further information (in Details) can be given if this is not enough ...
×
×
  • Create New...