Jump to content

Secure Form Posting Needed | SQL Error


siwelis

Recommended Posts

When posting to a form anytime I use a ' I receive this error message:

 

"Error performing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't it be used?', 'What can't it be used?', 'What can't it be used?'"

 

How do I get PHP to post that text? If available, I could really use some help figuring out how to block out or make null certain texts... such as < and >

 

- Thank you very much!

Link to comment
https://forums.phpfreaks.com/topic/50267-secure-form-posting-needed-sql-error/
Share on other sites

That did not resolve the issue. Every place I could fine to fit addslashes, I added it, even if it meant replacing stripslashes with it. After adding addslashes, I got the exact same error message due to the '

 

Perhaps it has something to do with the link I found http://www.newsforge.com/article.pl?sid=06/05/23/2141246 on the page you linked me to. So I changed my PHP version from 4.x to 5.0 and tried again. Still no different.

 

I really appreciate your response! Thank you! I'm pretty much a newbie to PHP and I'm using a book made by the creator of this website. There were a few errors (printing errors?), but I figured them out- The books just kind of old now in technology's terms, so I'm trying to secure code now.

 

-Thanks again!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.