rootKID

Members
  • Content count

    406
  • Joined

  • Last visited

Community Reputation

18 Good

About rootKID

  • Rank
    Member

Previous Fields

  • Languages
    PHP, CSS, HTML, JavaScript, jQuery, MySQL, MySQLI

Profile Information

  • Gender
  • Location
    DK
  • Interests
    HTML, CSS, Photoshop, PHP, jQuery, JavaScript, Ajax, MySQL, MySQLI, Movies, Gaming, Music, American Football, Homework
  1. Thanks for the answer, but really cannot figure out what is wrong with my code? I have started both session_start() and ob_start() with gzip... i am checking if the user is already logged in and yet no action (this is a function a little bit earlier in the code, nothing wrong, used it many other places before).. Any ideas? And ohh, thanks for the correction btw.. still a little new to the mysqli part haha And for future notice, the password checking was really only an example.. gonna remove it when done with all code hehe, but thanks for the info
  2. Hi W3S I am trying to make a login PHP code with MySQLI and it won't work for some reason, not sure what i have done wrong, can someone see what i did wrong? This is the code: //////////////////////////////////////////////////////////////////////////////////////////////////////// // Login //////////////////////////////////////////////////////////////////////////////////////////////////////// $SUBMIT_FORM_ACTION___TakeLoginForm = (isset($_GET["SUBMIT_FORM_ACTION"]) ? $_GET["SUBMIT_FORM_ACTION"] : ""); if( $SUBMIT_FORM_ACTION___TakeLoginForm == "TakeLogin" ) { $query_1 = "SELECT u_id, u_username, u_password, u_email FROM users WHERE u_email=? AND u_password=?"; if ( $stmt = $mysqli->prepare($query_1) ) { $FORM_email = $_POST['email']; $FORM_password = $_POST['password']; $stmt->bind_param('ss', $FORM_email, $FORM_password); $stmt->execute(); $stmt->bind_result($id, $username, $password, $email); $stmt->fetch(); // SECURITY! CHECK & COMPARE! if($FORM_password !== $password) { die(" <center><b>(Form) Login ErrMSG #1</b></center> <br /> <center>Password incorrect/wrong! Try again!</center> "); } // Make Sessions Needed! $_SESSION['user'] = array(); $_SESSION['user']['id'] = $id; $_SESSION['user']['username'] = $username; $_SESSION['user']['password'] = $password; $_SESSION['user']['email'] = $email; $stmt->close(); //header("location: index.php"); } } okay so lets see if i get this straight. In the bind_result part, this does not matter what kind of variable it is right? In the naming part... or does the names actual HAS to be like the ones in the Database Columns? I somehow think its the part there but correct me if i am wrong... Hoping someone can help me a little bit. Thanks in advance
  3. okay i know it's been a while, but thanks lol hehe, just seen this today "2 years from now", lol haha
  4. okay thanks, i think i got it now ^^
  5. Hello W3S! Been a while, as always I am sure i have asked of this before, but since my USB-Flash has been stolen in the school by someone, i am about to re-do a lot of projects and i cannot find the other posts on this website for some reason (my past post), so here i "probably" ask again in the hopes of you guys helping me a little bit. I know how to make a simple <select> filled with values, but i want some content (div-box with class content) to be shown AFTER a specific thing has been selected from the select-form. What do i need to use here? I could imagine some sort of JS/jQuery code combined with PHP? And if so, can someone guide me to the right path of where to look? Been trying to google but without luck :/ Anyhow, hoping you all good, and good to be back again
  6. Hmm, ok thanks i will try to do this If it dosen't help, ill try to come back yet again ... Thanks again!
  7. i knew that, somehow... lol.. not sure why i posted this on PHP now haha Anyhow, question is how? Do i measure the width or?... And then what? Like after 800px width add a drop-down "+ sign" to the end and add the rest of menu in there?... just throwing in ideas, feel free to jump in.. lol x)).. thanks in advance
  8. Hello fellow W3S Users. I have need of your hints and guides yet again. I have no code as such yet, but i was wondering if anyone could tell me how to make a PHP Query code that will count the menu items in my database and if the menu items are over lets say "8" or "9", then at the end of the menu there will be a "+" sign, which will become a drop-down menu for all the rest of my menu items? I have about 15 menu items so to make it look a little more pretty i thought that would be a great idea? Now i have a specific width "800px" for the menu, however my idea is that i either give the menu items "using ul/li for menu items" a specific width, orr give them an automatic width and then somehow say that if the menu items goes "outside the div-box", THEN make the plus sign with the drop-down menus? Is this possible? The last idea i mean? Because some of the menu items i have will have some long names (well sorts of, but still... considering for the feature...) Hoping you guys understands what i mean and will/can help me? Yet again thanks a lot and hoping you have some solution to my problem Thanks in advance, and best regards, rootKID.
  9. i know this, but the problem is that we have "bought" a new design, and the design was not designed to handle stuff like this (that i am aware off). What other menus are you talking about? If you have some ideas that could help or a guideline that would be great Thanks for the answer tho
  10. Hello W3Schools! Its been a while I am trying to help a friend setting up he's webshop. It is already online but trying to make it look more nice according to webdesign template - this is hes website shop (www.thai-online.dk) i have already changed A LOT on this design, now i mostly need the menu... as you see the menu navigation has a lot of categories, and he told me that he wanted to add a lot more in the future if this shop could run online, so i am trying to figure out a solution for this. I already like the design myself, except the menu, so i have come to a solution that i am working on and hopefully you can help me out, work with me. As you see i currently have added 13 Categories, now my idea is to code some PHP into the menu on OpenCart so that if the menu design is ABOVE "1100px" in width AND has more than 7-8 categories on the menu, it will only show the 7-8 categories and at the end of it all show a little plus sign "+", when clicked on the plus sign a little side-menu will appear out from that little plus sign. The reason for using the 1100px width thing is to know if its on a pc orr on a mobile (if you know a better way please tell me, this is just to show you what i want) i know for sure the "plus sign" already has been made somewhere, but how to actually do it? We are using opencart version 2.0.1.2 or something like that... this is the code i found on the .tbl file: <?php foreach ($categories as $category) { ?> <?php if ($category['children']) { ?><li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><span><?php echo $category['name']; ?></span> <img width="8" height="8" class="menu-close" src="catalog/view/theme/atr374opc2101/image/menu_close.gif" /><img width="8" height="8" class="menu-open" src="catalog/view/theme/atr374opc2101/image/menu_open.gif" /></a> <div class="dropdown-menu"> <div class="dropdown-inner"> <?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?> <ul class="list-unstyled"> <?php foreach ($children as $child) { ?><!-- --><li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li><!-- --><?php } ?> </ul> <?php } ?> </div> <a href="<?php echo $category['href']; ?>" class="see-all"><span><?php echo $text_all; ?> <?php echo $category['name']; ?></span></a></div> </li><?php } else { ?><!-- --><li><a href="<?php echo $category['href']; ?>"><span><?php echo $category['name']; ?></span></a></li><?php } ?> <?php } ?> On another note, we are also using BootStrap (latest version) to make the design responsive. And the reason why i use the 1100px width, like i said before is because of knowing if the screen is that wide AND to tell if i should be adding the category addon... if the screen however is less than 1100px (or so...), the menu should be normal. Reason why i do this is because i already like the responsive design, i only need to edit the PC-Screen design a little bit so the menu can fit without problems. Hope you all can help out one way or another, still struggling with this little thing Thanks in advance and again, its been a while, so..... HELLO // rootKID
  11. Hmm... thanks for the answers guys, will check it out ^^...
  12. Hmm... i will take a look at this when i get home, but like dsonesuk says... you only define 1 class to all of them, that is how i understand this anyhow ... i will take a look at the code when i get home. Possible for you to share the code? The whole website code from the "information.html" file? Just hit "ctrl + c" and "ctrl + v" on a Windows machine to copy and paste the whole code into code-tags so we actually can see what is going on ^^ Seeing the code on website and on here is 2 different things, depending on how you have coded the website Will take a look if you share the code LaTeRz
  13. Hello W3S! Yet again here with a question. I was wondering if it would be possible to run a script/javascript/jQuery that will update a page/element of a page (( IF )) there is any new item in the database? I have seen this in chats online over the internet. The chat wont change what is already there, and if there is being written anything to the database, the new item/chat message in the database will automaticly (( Fade )) into the chat via jQuery. Is this possible? If so, where to look? Possible to guide me to a place where i can find some details? Would be much appreciated! Thanks in advance W3S!
  14. Thanks for the support! I think i got the idea now, i will test the code and return again if i fail.. which i most likely will hehehe ... Thanks anyways!
  15. Thanks dude, will take a look at it. All i am looking for really is something that has already been done by the "toogoodtogo" food website service when you look at their map :/ They show which restaurants their services applies on the map, that is why i want it integrated...