Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by benanamen

  1. From the same site. I rest my case. http://webaim.org/techniques/tables/
  2. You seemed to have missed the "General Form Accessibility" from page 1. "Make sure that the order in which form elements are accessed is logical and easy. This can sometimes be problematic if tables are used to control layout of form items." From what I briefly read, that site is not advocating using tables for form layout for accessibility and in fact leans to the opposite. As far as tables in the link you provided, that sections focus is "Handling Multiple Labels" and not about using a table for ease of accessibility. There is nothing about using a table for accessibility leverage. The answer is still no, do not use tables for form layout.
  3. For gawd sake cyber, really?
  4. Why don't you tell us more in detail exactly what you are doing. I believe this is an XY problem.
  5. Yeah.., no, not whatsoever. Not an opinion, just a fact. As @Jaques1 has correctly pointed out, tables are for tabular data. Period.
  6. No, you dont "Got it". @mac_gyver gave you the correct response. Using tables for page layout went out in the 90's. You need to use CSS.
  7. You are using obsolete code that has been removed from Php. Use PDO https://phpdelusions.net/pdo
  8. No one can send you a message because you are new. I am available.
  9. The difference is in error handling. Per the manual:
  10. If you only need one space, use your spacebar.
  11. The only thing with line 3 is it is hard coded for linux. You would want to use DIRECTORY_SEPARATOR to set the proper slashes for Windows or Linux. const PAGES_BASEDIR = __DIR__. DIRECTORY_SEPARATOR .'pages' . DIRECTORY_SEPARATOR;
  12. See the code here https://forums.phpfreaks.com/topic/302370-router-any-issues-comments/
  13. That is one of the biggest problems with "coders". If you are going to be a programmer, you need to get rid of the "It works so I will use it" mentality. Did you even try to run the queries @Jaques1 provided you?
  14. Re-reading the OP's response, I see he "says if any of them" are true then it changes, if ALL are false. "If they are all false". I didn't read it correctly.
  15. If I understand correctly... SELECT IF(streamStatus=true,"True Message","False Message") AS streamStatus FROM table_name
  16. You have a handle of $row but are using $_row.
  17. You mentioned security.php. start with that file.
  18. We are not going to download a zip file. Post your code in the code tags.
  19. DERP! Your right, second way won't even work. Thanks. (And no, no plaintext passwords. I know better)
  20. Does it matter which way? SELECT username, password FROM users WHERE username=:username (Now compare password if valid username) OR SELECT username, password FROM users WHERE username=:username AND password = :password
  21. Thanks for your feedback. This is only used in DB backend applications requiring logging in so SEO is of no concern.
  22. I would like feedback on this basic single site entry procedural code. Any issues, improvements or comments? (included in index.php) <?php /* * This file: display_pages.php * Acts as a Router to display pages * Restricts access to certain files * */ //------------------------------------------------------------------------ // Restrict access to these files //------------------------------------------------------------------------ // Specify some disallowed paths $restricted_files = array( 'header', 'footer', 'navbar', 'menu', ); //---------------------------------------------------------------------------------------- // Display Pages //---------------------------------------------------------------------------------------- if (isset($_GET['p'])) { $page = basename($_GET['p']); // If it's not a disallowed path, and if the file exists if (!in_array($page, $restricted_files) && file_exists("./includes/$page.php")) { $include = "./includes/$page.php"; } else { $include = './includes/404.php'; } } else { $include = './includes/default.php'; } ?>
  23. Storing passwords in plaintext is very bad. You need to use password_hash and password_verify. You never ever insert user supplied data directly to the database. You need to use prepared statements. Overall, it looks like you are using some rather old code.
  24. You are using obsolete Mysql code and are vulnerable to an SQL Injection Attack. Update to PDO. https://phpdelusions.net/pdo
  25. Probably because you are mixing PDO with obsolete Mysql code. Start at this tutorial and learn what is there before you try to move on. https://phpdelusions.net/pdo
×
×
  • 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.