Note that there are some explanatory texts on larger screens.

plurals
  1. USBill
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. CODaganh! Thank you! I just reread that code and it's almost exactly what I had seen in my head! Now what do I do about different page templates? If every page had the same layout I could use the same index and just call different content from different DB rows depending on the value of GET. But if the HTML is different in every page but the home page I'll have to call another PHP script that essentially does the same thing as index but with different HTML mixed in. How can I avoid that and keep everything on index.php?
      singulars
    2. COThank you! I am actually implementing a kind of crude framework like you suggest. These in page will be elsewhere in a separate file and I do have a bootstrap file with connection variables as constants and I am in the process of creating a file to hold all the most common functions so I can include them. I'm getting the theory and your answer helped a lot and tells me I'm getting closer. How about this: I use an if statement. If GET is not set then return data from a default database row. If GET isset then return data from rows that GET holds (like where id=whatever and page name=something.?
      singulars
    3. COThanks, what I'm having trouble with is wrapping my head around the magic Rails does around authentication because I'm not explicitly telling the framework "hey, grab the password hash that matches this username, pull out the salt, hash the form input, then compare them". In reality, what I'm saying is "take this input and hash it then compare it with the matching hash that corresponds to this username" while Rails does some magic to fill in the blanks in the background. So far the hardest part of Rails is allowing yourself to let the framework take care of stuff you'd normally write yourself.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload