Jump to content

rootKID

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by rootKID

  1. hello again, hoping you still see this... i have now fixed the under-menu problem... but what i realize now is that its never been the category problem... but the shop... when a product does not gets a ID, then error.... but what i do not understand is that i have setted it into a (IF/ELSE) php word, so it should not give a error... shop.php Code below: $catID = $_GET['cat_id'];if(!isset($catID)){$result = mysql_query ('SELECT * FROM `shop_cat` ORDER BY shop_cat_id ASC LIMIT 1')or die(mysql_error());$row = mysql_fetch_assoc ($result);$catID = $row['shop_cat_id'];}$query = "SELECT * FROM shop_items WHERE FK_catID = ".$catID;/*echo "<pre>";print_r($query);echo "</pre>";*/$result = mysql_query($query)or die(mysql_error()); if(mysql_num_rows($result)>0)//Checking to see if there is any rows to take...{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']." USD</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"); }}} Category code below, then you also have that part...: $under_query = "SELECT * FROM shop_cat";$under_result = mysql_query($under_query)or die(mysql_error()); if(mysql_num_rows($under_result)>0)//Checking to see if there is any rows to take...{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> ";}}//If ends...else {echo "No categories added yet...";} but the code are about the shop.php...how can i fix it?... (Look at attachment if so...)
  2. Hello W3S Forum... everything is fine when i look into like firefox browser orr google chrome orr such... but if you are looking in the picture ive attached... then when i view the site with explore browser (latest version)... then the white border (a banner with a link). what shall i remove in the .CSS file to remove this?... thanks in advance..
  3. i do know what each part does... just that sometimes i kinda forget when its getting to the higher places like this... i mean... alot of codes in one place ... but thanks... i will try and then post feedback if i succes... but just one more question... do i need to use the variable $catID that was created instead of the $u_row?... i mean... would it be the same... its both the same id... and giving less query's... right?... EDIT: going to bed... but giving feedback tomorrow... thanks for now ...
  4. $_GET to blank?... would that not just give an another error?...and what do you mean with the cat table to be empty?... it allready is empty... and giving no errors due to the fix i just did... the only thing that im needing to fix is the shop.php now... :/... EDIT: orr is it me that does not understand what's being told...?...
  5. ti does not gets a ID... and still trying to get the ID... i know that part... just not what to write to fix... :/... EDIT: ok... i think i might have fixed the shop_undermenu.php file... (the one that shows the categories...) with the very same tag (if)...CODE: <?php$under_query = "SELECT * FROM shop_cat";$under_result = mysql_query($under_query)or die(mysql_error());if(mysql_num_rows($under_result)>0)//Checking to see if there is any rows to take...{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> ";}}//If ends...else {echo "No categories to show... come back again later ...";}?> the only problem im getting this now: (LOOK AT ATTACH IMAGE...) and no clue what to do now... hoping answers soon.. thanks ...(will go to bed now... hoping a answer by morning... elsewhere i am really clueless right now...) :/... PS: Here are the Shop.php Code... just in case... lol ... 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')or die(mysql_error());;$row = mysql_fetch_assoc ($result);$catID = $row['shop_cat_id'];}$query = "SELECT * FROM shop_items WHERE FK_catID = ".$catID;echo "<pre>";print_r($query);echo "</pre>";$result = mysql_query($query)or die(mysql_error());if(mysql_num_rows($result)>0)//Checking to see if there is any rows to take...{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"); }}}
  6. Ingolme... you was right... somfthing is wrong with that query... picture added...
  7. yes i have done the mysql query error checking in all the query's now... on both files ...
  8. still the same as in the picture i have added in post #7...
  9. do i need to remove the Whole If/Else word?... i mean... just the if/else and not stuff from inside...?
  10. but where... i mean... what do i need to fix? :/... just can't see it :/...
  11. ok... will try.... thanks ... posting feedback if can't fix .. EDIT: jSG... you said i had a error in the SQL... but what error exacly... cannot see it :S...
  12. Shop.php Line -> 63 if(mysql_num_rows($result)>0) and the pictures added is the (shop_items),(shop_cat) tables i have...that should answer the question i suppose ...
  13. 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 ...
  14. rootKID

    Layout help

    where do your div id (container) ends?... and have you commented that out too?... i mean... if one thing is commented out, then the stop should also does that... else its too many stops ..,.
  15. hmm. ok, thanks... ill think i just use this as it is now and trying to upgrade in the next version ... trying to build a bigger system builded on Versions ... trying to build up Version .001 :D:D... anyways.,. thanks! .
  16. Thanks alot bro!... it works now ... just what i was going to point for ... nice ... now just an another question... that is a little bit diffrent... i dont know if you know this source: www.tbdev.net...but its a Torrent Source... and the modifications they have are the once im trying to convert... some of the at least ... anyways... the point is that when i see this at my SQL: $news_query = "SELECT n_headline,n_text FROM news"; now how can i do so it will only show stuff like 12 to like 30 days... this is the code from tbdev: $news_expanded = "SELECT * FROM news WHERE added + ( 3600 *24 *45 ) >".time()." ORDER BY added DESC LIMIT 10"; and they have done it as i can see it...now... the question... what shall i add to my query before this also can happend?... EDIT: i will check back tomorrow... is a little tired... hoping a answer soon made ... thanks in anyways if you can't ...
  17. ahh... so just to assamble what ive learned so far... lol... 1. the link should be around the link (text)...2. the link (text) should be outside the div...3. the div for itself (with) a ID... 4. will post feedback and see how it wents now ... EDIT: ok... it all works damn nice well now! FREAKING THANKS! the only thing.. if you know how.. the messeage is going to be shown in the beginning of the showing of the page... how can i do so that not is going to happend?...i mean... so the people HAS to click on the link to see the news...?...
  18. what if i wish both on?... the text (and picture?)... and by the way... i did try that, to add the link inside the div box and around the text... and still dis-appeared... :/... Like so: echo '<div id="k'.$id.'"><a href="javascript: klappe_news('.$id.');">'.$n_row['n_text'].'</a></div>';
  19. ok... got it working now... kinda... when i click the link... well... then its just going gone... dis-appearing for some kinda reason... Pics added below... CODE BELOW: echo '<a href="javascript: klappe_news('.$id.');"><div id="k'.$id.'">'.$n_row['n_text'].'</div></a>';
  20. still not working... Code below: echo '<a href="javascript: klappe_news("a'.$array['id'].'");"><div id="k' . $id . '">' . $n_row['n_text'] . '</div></a>';
  21. Hey JSG... just tried a method that i got error with... and now i was trying yours... just almost working ... see a picture... and how i was integrate your code with my: echo '<div id="k' . $id . '"><a href="javascript: klappe_news("a'.$array['id'].'");">' . $n_row['n_text'] . '</a></div>'; just that when i click the link, then nofthing happends... that... plus it does not shows up the ID (k++) i have given it... just the name (Javascript(...) and thats it :/...ideas?... DUMP: just for asking... why would you use a button if you would have (Alot) news at one time... then you would use a button on each news?... orr am i missing somfthing :/?..
  22. sorry... just me that are trying to be rude again... sorry, just hate waiting on answers when somfthing fails .. but i will try again... i will post feedback later! . EDIT: how to add a link that calls the function? :/... i mean... i knew how to add a image (with) a (a href='') link... but that calls a function?... how?... can you give a example... i will try myself later... but just in case i do wrong... i will post my code later also... in that way you can see im not cheating lol ..
  23. lol... really?... no answers?....i mean... thanks for the try... but no solution yet ^^'...
  24. what about XAMPP... they can be used at diffrent ports... im using XAMPP at PORT 8080... and working just greate ... my providers blocks the freaking port 80 just like you -.-'...
  25. hey jsg... ive tried to move the picture to an another location also... and edit the JS file and PHP file... still the same... here is the diffrent codes now: function klappe(id){var klappText = document.getElementById('k' + id);var klappBild = document.getElementById('pic' + id);if (klappText.style.display == 'none') { klappText.style.display = 'block'; // klappBild.src = 'images/blank.gif';}else { klappText.style.display = 'none'; // klappBild.src = 'images/blank.gif';}}function klappe_news(id){var klappText = document.getElementById('k' + id);var klappBild = document.getElementById('pic' + id);if (klappText.style.display == 'none') { klappText.style.display = 'block'; klappBild.src = 'styles/images/backgrounds/icons/minus.gif';}else { klappText.style.display = 'none'; klappBild.src = 'styles/images/backgrounds/icons/plus.gif';}} <?php$news_query = "SELECT n_headline,n_text FROM news";$news_result = mysql_query($news_query)or die(mysql_error());/*while($n_row = mysql_fetch_assoc($news_result)){echo $n_row['n_headline'];echo "<br />";echo $n_row['n_text'];}*/ $id = 1;while($n_row = mysql_fetch_assoc($news_result)){ /*echo $n_row['n_headline']; echo "<br />"; echo $n_row['n_text'];*/ $id++; echo '<div id="k' . $id . '">' . $n_row['n_text'] . '</div>';}?> Ideas?...
×
×
  • Create New...