Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Your code makes zero sense.
  2. We have absolutely no idea what that code does! We are not there in front of the code with you! You are going to need to provide relative information.
  3. So, how does it make sense to use ajax to redirect a user to another page?
  4. If {*} in the following line needs to be replaced dynamically, then that is the part your router would need to return. App\Core\Frontend\{*}Controller So, assuming you are trying to load the file App/Core/Frontend/Base/IndexController.php And your code looks like: $class = 'App\\Core\\Frontend\\Base\\' . $controller . 'Controller.php'; $controller = new $class; Your router would need to return 'Foo\Index'. Really though, why are you reinventing all this stuff? Its been done before.
  5. Your router is going to need to return more useful information about where you controller lives than just the short class name.
  6. Redirecting a page with Ajax? That makes no sense at all. Do you know what Ajax is?
  7. Because of PHP's long history, unfortunately the internet is riddled with bad examples of PHP code. If not told otherwise, beginners learn by studying these existing (bad) examples. I always recommend newcomers read this first nowadays: http://www.phptherightway.com
  8. Please.. you need to be more vague, I'm finding it far too easy to read your posts.
  9. You need to find yourself some tutorials on a 'Join in SQL'. Executing queries within loops is terribly inefficient.
  10. Your classes need to be namespaced properly, meaning you would instantiate your router using: $router = new App\Core\Router();
  11. What error are you getting?
  12. You want to store the result of calling startTone() in a variable? var foo = startTone(tone); The question however is, what does this function actually return? Obviously, there is no way for us to know the answer to that.
  13. You are redefining $row within your while loop. Seriously, you need to look into how to query using joins, the way your going about things currently is wrong.
  14. Your query is failing for some reason and $run is the bool false, not what mysql_num_rows expects. Always check your queries succeed before using the value they return.
  15. That is not a question.
  16. I do not understand the question / problem.
  17. Change: if ($_SESSION['logged_in'] == true) { To: if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
  18. $_GET['menu_id'] will not exist until your form is submitted. So.. wrap all the php code at the top of your script in a condition that checks to see if the form has been submitted.
  19. You tell us.
  20. You have double quotes within a double quoted string, breaking that string. You are missing quotes around the strings 'body' and 'html'. You have quotes and braces places you don't need them. You need to escape the inner quotes: <?php include "./includes/egl_inc.php"; $secure = new secure(); $secure->secureGlobals(); page_protect(); $out['body'] = "<strong><a href=\"#1\">text here</a></strong><br>"; include $config['html'];
  21. Just for that, your on my ignore list. Fend for yourself.
  22. It's pretty self explanatory, $rows isn't defined anywhere in your code.
  23. That has what to do with MySQL?
  24. The idea of constants being defined via form submission sounds all together dodgy. They are "constant" for a reason. They are meant to be reliable. Why are you using constants for this data?
×
×
  • 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.