I want blank textbox value to be inserted into the database.
For that I kept those fields 'default NULL' in mysql. Still doesn't take empty textboxes to be saved blank. What should I do? where am I wrong?
For a start, this is wrong values'.'(
I don't know what you are trying to do their but it will break your script. You are also mixing styles of quote marks in your value parenthesis so change them all to be the same.
"INSERT INTO tablename(ABC,BCD,CDE,DEF,EFG,FGH,GHI,HIJ,IJK) values('".$this->_abc."','".$this->_bcd."','".$this->_cde."','".$this->_def."','".$this->_efg."','".$this->_fgh."','".$this->_ghi."','".$this->_hij."','".$this->_ijk."')";
I have put the right sql syntax otherwise it couldnt save the form. it inserts my values only when I dont want those 4 values blank(NULL). it also saves my varchar with null but WHAT ABOUT DECIMAL. APPLIED MANY WAYS BUT FAILED TO SAVE THE FORM WITH NULL IN DECIMALS.
well I converted my field type from decimal to int as I only need int values instead of decimal. insertion of those fields with null values from textbox isn't done. I will try if I can change something and get it done. Thank you all for helping me really. and please do suggest on this if that can solve my issue.