Looking for Script PDO, SQL, PHP
Not sure I'm in the right place. I have working scripts that have users do the following:
fill in a forms and have the results added or edited to a mysql database.
I've been told that my code is awkward and old. I need some help with PDO to maybe rewrite my existing code.
Any help in the right direction is greatly appreciated.
Are you looking to learn and do it yourself, or to hire someone to do it for you?
Myself. I've done all my previous coding
You'll need to read up on PDO and give it a try, then. Once you have specific questions, post back here, and include your code so we know what's going on.
Is there a good PDO tutorial. I've looked at some and was really confused
IMO, the best place to start is the PHP manual (that's what I linked to). Start with the __construct method, look through the examples, and then follow the links to other methods as you discover them.
Can you give a specific example of something you were confused about? We'd be happy to help.
I was going to send you my program files so you could tell me if I REALLY need to change anything but the forum won't allow me to send .php files
For files that are too big to post in a thread, your best option is an online service like github or pastebin. File attachments don't usually get a good response on forums these days.
You should obfuscate any sensitive information in your files (usernames, passwords, api keys, etc.) before sharing.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
As for whether or not you "really" need to change anything, the answer is probably "yes." The
mysql_* functions are deprecated, and have been outdated for ten years. Most code ever written with them is awful.
Last edited by traq; 04-29-2014 at 09:28 PM.
I'll be gone for a couple of weeks so I'll respond mid May. Thanks for the help