PHP Blank Values Inserted In Database -


I am using PHP and MySQL

Here I am simple to insert name, email The form is used, phone number

I have confirmed all the data: (PHP code after submitting ...)

  $ error = array (); If (isset ($ _ POST ['name']) and $ _POST ['name'] == '') {$ error [] = "Please enter a name"; } If (isset ($ _ POST ['email']) and $ _POST ['email'] == '') {$ error [] = "Please enter email"; } If (isset ($ _ POST ['phone']) & $ _POST ['phone'] == '') {$ error [] = "Please enter phone"; }   

Finally enter the data using the query below.

  if (count ($ error) == 0) {$ error = "" ; And query the matab ('name', 'email', 'phone') value (mysql_escape_string ($ _ POST ['name']), mysql_escape_string ($ _ POST ['email']), mysql_escape_string ($ _ POST) ['Phone'])); Redirect to success ..}   

This works fine, but for some time I am getting $ error entry below.

Error log:

  Time File Name: myfile.php $ Error Insert: Enter in mytab ('name', 'email', 'phone') value ('', '', ''); # ~ #   

The log I was writing using my DB wrapper class (mysql_ $ error ()

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -