Jump to content

Zane

Administrators
  • Content Count

    4,159
  • Joined

  • Last visited

  • Days Won

    10

Zane last won the day on October 24

Zane had the most liked content!

Community Reputation

63 Excellent

About Zane

  • Rank
    Prolific Member
  • Birthday 08/19/1986

Recent Profile Visitors

17,804 profile views
  1. OK, so that should involve: A users table, of course, that contains the height and age An attributes table, with a column for the name of the attribute and unit of measure (UOM i.e years). A user_attributes table with a column for user id, and attribute id, attribute's UOM value
  2. So, it sounds like what you're after is custom attributes User A has a hypnotism rate of 45 neurons per second, and a clairvoyance rating of 5 / 10. User B has a rank of 3 of understanding of quantum physics and a shoe size of 25 and a half meters. User C has fourteen years worth of towel folding experience User D can eat twenty three beer battered brauttwerst in 48 seconds. Am I getting closer to what you're talking about?
  3. First of all, PHP and HTML are two separate things altogether. PHP is typically used to generate HTML. No matter what language you use, when you load a page in a web browser it's source will be pure HTML (and/or even JavaScript). In PHP, the way to preserve a session on every page is to call this function before the first time that you use any $_SESSION variable or anything session related. session_start(); There's no "html page" or "php page". There is just a file that a browser reads the best it can depending how the server reads the extension of the file. So, in order to accomplish the problem of "keep my users logged in on an html page", you need to have PHP file that checks for the session's existence and resumes it if it exists. If it doesn't exist, then it starts one. Correct me if I'm wrong, but I get the feeling when you refer to a "php page", you're referring to the extension of the file ..? mypage.html vs mypage.php
  4. From what I understand so far, you're wanting to keep up with car parts, no? I'm not an auto expert or anything, I'm just trying to get a feel for what exactly you're aiming for here. Either you're trying to keep a record of engines, engine parts, and just auto parts in general, and you're wanting to be able to link certain parts to the cars/autos they're available/compatible with,... or, you're just keeping up with a list of cars and what motor(s) they have/had for e.g a car lot where car salesmen sell cars and keep up with the inventory. Or, perhaps, you're working on a use case catered to mechanics who fix cars and want a history of all of the parts this car has every had in its lifetime. Anyway, it'd help to explain what you're trying to accomplish.
  5. Cars contain a motor. Motors do not contain cars. Therefore, put a column for motor in the Cars table and link through the various motor ids.
  6. Yes! Especially since you're not wanting to use JavaScript, it's as simple as putting links to the same php file but with a query parameter for the category. If you'd use JavaScript, you could do some AJAX magic and just change a portion of the page to reflect the category clicked. That's a bit more involved, though.
  7. What? A bit impatient, aren't ya. First, you make a PHP script that grabs all products from a database where the category equals whatever is in the GET parameter in the URL http://mysite.com/products?cat=movies Then, you loop through the results and display them however you want. It's also possible that a product is part of multiple categories. In that case, you'd have a table just for categories, and then another table linking the columns to products, and then the products table. There's really no cut-and-dry answer here. You simply grab the category id or name or whatever identifier you want to use and grab the products from your database based on that category id.
  8. There are a handful of those kinds of pages. Category Listing Page (CLP) Typically, this is more or less what you'd call a homepage for a particular category where you explain what it is, provide pictures of different products in that category, etc... Typically, the CLP might have a few featured products, but doesn't show them all. Then again, it's up to you. A lot of times you'll find videos on this page, or some kind of introduction to the category. Example: https://www.burpee.com/organics/ Product Listing Page (PLP) This is a page listing your products. It's named as a Listing Page because the products are displayed in a list. Example: https://www.burpee.com/herbs/container-herbs/#sz=24&start=0&type=list Product Grid Page (PGP) Whereas, on a product grid page, they are displayed in what you'd described as a matrix. For instance, 5 columns of products, each row containing 5 product squares. Example: https://www.burpee.com/herbs/container-herbs/#sz=24&start=0&type=grid From then on out, you just have your Product Detail Page (PDP) for products that were clicked on the PLP/PGP/CLP
  9. Sounds like you need to layout your design first and come back with code that you've tried already. You did mention that you have a history with PHP, so gives us a PHP problem to solve. I'm not sure what you're asking. Are you asking if your thoughts sound good? Or, are you asking us what kind of effort it sounds like it would take to do such a task? Or, are you just asking how to do it all? So far, all I understand is that you want to show a list of products and filter it by category. You're also not using JavaScript, so you want these links to refresh the page when clicked and load a page with a pretty url like mysite.com/movies using mod_rewrite. It all sounds ... like the fundamentals of an ecommerce website really. List of products, add to cart, checkout, purchase, etc... Yet, you're only focused on the product listing part at this point and are simply asking how a list of products sounds.
  10. Are you talking about filters? Drilling down the list of products depending on things like Color, Brand, whatever..
  11. Yes. It's not only reasonable, it's common practice to do it that way (with mod_rewrite). Off the top of my head, I can't think of any other way to accomplish this.
  12. Seems like you're only real question is whether or not you're going about this the right way. While there isn't a "right" way, per se, to do something, this is probably the most popular way. You didn't provide code, so I assume you've already set things up this way, no?
  13. Why not? That's the whole point in having an id attribute, to identify it easily. Instead of having to use textarea[name='LOOKUPADDRESS'] you can use #LOOKUPADDRESS To get you textarea to populate, though, you'll need to listen for the click of the anchor tag, or modify what happens when it's clicked. <a href="#nowhere" id="anchor">Click HERE</a> <textarea id="LOOKUPADDRESS"></textarea> document.getElementById('anchor').onclick(function(arg){ arg.preventDefault(); var t = document.getElementById("LOOKUPADDRESS").innerText = "<?php echo $col; ?>"; }); I haven't tested any of this code, so copy and paste at your own risk.
  14. You lost me at machines hurting you.
×
×
  • 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.