Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by benanamen

  1. In my "defense" my response was directed to the "Experts" that posted on this thread and not to the OP. An expert doesn't need an explanation of obsolete code. Anyone with enough expertise to respond with help to the OP "should" know enough to spot the obsolete code and at least point it out even if you are going to help fix it. To my surprise, nobody did. Had I responded to the OP, I would have directed OP to the PDO tutorial that I just did. In the words of Forrest Gump, "That's all I have to say about that".
  2. Troll? Hardly! No one in this thread even mentioned a single thing about the OP's obsolete code. So I am a troll because I pointed out something VERY important, not only for the OP, but for the web? How are you helping when you don't even tell the OP that his code is obsolete and point him the way of PDO or at least Mysqli? Help with bad code all you want but at least tell the OP so he knows. In due time? For real? The OP is here right now. Teach him the right way while he is here, not some mystical time in the future. OP: Check out this link on how to use PDO: https://phpdelusions.net/pdo
  3. Benanamen say: Stop teaching people how to use code that has been deprecated starting over TEN years ago. There is just no excuse to keep that kind of code alive. Better to teach the OP's PDO or at the least Mysqli. There is no reward waiting for you in programmers heaven for fixing obsolete code. Word on the street is you may even get sent somewhere else for doing it.
  4. Since I don't know what it is you're actually trying to accomplish I can't give you a good answer. You have provided no code. Thats pretty much the first thing you need to provide if you have it. How about an explanation of what you're trying to accomplish, the big picture. (Not how to do what you think needs to be done.) The ol what have you tried, what was the result, what is the expected result, along with a good overview of what is to be accomplished... I am sure you know of this.
  5. Experience shows that once they get their old code working they never convert it later. Not always, but mostly. The only thing that is truly going to solve this is when every server has PHP 7.
  6. Lol! Yeah, I know. It is the natural reaction when you hear that somebody is talking about you. "What did they say, what did they say, tell me tell me."
  7. The user should not dictate how you store the data. Allow the user whatever format you decide for him to enter it but piece it back together to store it as a proper date time field. You can parse that out anyway you want later.
  8. Click the info button on your remote control and it will give you the start and end time of your show. You could also look in the TV Guide if you have one. Some systems can give you all the start and end times for that particular show during the programming period. * split posted for some reason
  9. I am on another Forum that does exactly that. It hasn't seemed to provide any real benefit to me except to know somebody was talking about me.
  10. Any duration needs a start and end. Simply have a start and end datetime columns in your database, unless one of them is calculated off one of the dateimes, then you just need one date time column that is either a start or end date time.
  11. Why are you people helping get obsolete insecure code working? You should be helping him convert this to PDO.
  12. What exactly is the code you tested in IE8?
  13. I have done pretty exhaustive testing. I wasn't going to say something is the correct way to do it just because @Jaques1 said so or anyone else for that matter. I want to know, by code if something is wrong or not. Although I preach the request method on forums, I still use if ($_POST) in apps that I am the sole coder and are not public access. Your right. The IE8 issue is specific to how it handles submit and will completely fail with notice of any kind that it did. Either of those will work. Checking for submit will not. On this issue, it doesn't matter one bit if all the data is correct. IE8 behaves exactly the same as if you didn't click the submit button. The script cannot "Do it's job" if it never runs.
  14. Why don't you know? Why don't you test it and see for yourself.
  15. Are your rules that anyone that uses IE8 is not allowed to use your script?
  16. Seriously? Thats a joke right?
  17. Pretty sure he is referring to me. After many back and forth with @Jaques1 and actual testing, it is a fact that using request method is the correct and failproof way to go. At this point I am pretty burned out on explaining the whys. Perhaps @Jaques1 will do it. One particular instance counting on a button to be submitted that will completely fail is with IE8. I don't want to hear about how its older or not many people use it. It is the default version for windows 7 and unless someone does an upgrade, that is what they have. If you don't care that your script will completely fail for all those users, then so be it. As Jaques1 would tell you, "It is naive to expect that every user is going to use YOUR form to submit data". And in the case of a user using cURL, they are not going to be submitting your button in the request and will have no way of even knowing you are expecting it for the script to work. You have to make way too many assumptions doing anything other than the foolproof if ($_SERVER['REQUEST_METHOD'] == 'POST') Do your own testing or ask @Jaques1 to explain it in detail. I was previously a if ($POST){} coder before @Jaques1 undisputedly schooled me.
  18. You still have problems. You are wide open to an SQL Injection Attack. You NEVER EVER insert user supplied data directly to the database. You need to use prepared statements. Also, depending on the name of a button to be submitted will completely fail in certain circumstances. You need to use if ($_SERVER['REQUEST_METHOD'] == 'POST')
  19. I have never used a third-party framework and in all my years I've never found a "need" to use one. I do have to say that in all the projects I have worked on, I have been the only programmer and have built everything from the ground up so that could make a difference for some. I created a dynamic crud generator that can create an entire back end at the push of a button in a matter of seconds regardless of the amount of tables. Using the party model DB schema I can scale to Infinity on large projects with no problem. I would say just use the right tool for the right job. I am interested to see the feedback you get on this.
  20. One cause of a blank page is using short tags when short tags are not enabled.
  21. You are using obsolete MySQL code that has been completely removed from PHP. You need to use PDO with prepared statements. You also do not want to output server errors to the user. What is the user supposed to do with a server error message? It is also a security risk.
  22. This is not even close to what the OP asked for.
  23. He is using bootstrap. The divs are correct.
  24. The problem comes when upgrading to a newer version of bootstrap. You will lose all your changes or have to redo them all over again. If you override the variables in an external CSS file you will not have that problem.
×
×
  • 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.