February 14th, 2013, 09:29 PM
Wont import values into table?
So I have been stuck on this for a long time now. Thought I could use a more experienced member's help. I am trying to import my news post into my table news. I have tried a lot of things. But just so you know i'm a beginner with MySQL and have copy/pasted this code from YouTube:
pastebin (.) com/KxEUY6qk
February 15th, 2013, 04:15 AM
what's the concrete problem? What error messages do you get?
I mean, you can't expect us to set up a full test system for your code and then start testing in the hopes we stumble upon the same error (which we do not even know).
However, I think it might make more sense to rewrite the code than trying to fix it. It has several massive security holes, and it's generally quite ... weird.
Check the link in my signature to avoid typical mistakes like inserting variables into query strings. You should also stop copying and pasting stuff. The code looks like you merged two completely different scripts from different people. For example, you use the old MySQL extension and the new MySQLi extension at the same time, which makes absolutely no sense.
Write your own code. It won't be perfect at first, and you'll have to spend some time on it. But at least it will make sense, and you'll actually learn the language.
You should generally be careful with copy and paste in the PHP world. The internet is full of terrible PHP code and bad tutorials from clueless people. If you blindly copy that stuff, chances are you'll tear gigantic security holes into your server.
Comments on this post