Jump to content

How to keep MySQL Values the same


neex1233

Recommended Posts

I assume what you mean is that if a user doesn't enter anything into one of the fields on your form when they submit the value written to the database is blank and you don't want that to happen?

 

There are many ways around this..

 

You could use javascript to make the form fields required, ie that cant be blank.

 

You could use some error checking to make sure the field has data before writing the query.

 

You could set the default value of the column in the table to something other than NULL so it doesn't come in blank.

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.