PHP/MYSQL Insert Issue

by 4 replies
5
I have a form I'm building where I want users to submit some information via an INPUT TYPE="TEXT" box.

The db field is set to VARCHAR(16).

My problem is that only numbers seem to work. If I use letters (or any other characters) the submission does not work. I do not get any errors, but the data just doesn't appear in the database.

Example:

45 - works
try35 - does not work
try - does not work
try-45 - does not work

I've been trying to figure this out for a while now. I've changed the db field to TEXT, and to BLOB, but nothing worked.

Any suggestions?
#programming #insert #issue #php or mysql
  • What are your complete FIELD settings in the db for the offending field?
  • squid,

    What's the server-side code that processes the form? Perhaps the field is checked for integers?

    lets see the processing code, we'll be in a better position to help out.

    Cheers,
    WP4H
    • [ 1 ] Thanks
  • do you put the data within single quotes when doing the insert?
    • [ 1 ] Thanks
  • Thanks guys. The problem was that I wasn't using single quotes when doing the INSERT.

    I appreciate your responses...

Next Topics on Trending Feed