mysql - php - Insert doesn't enter values to form -


Hi guys, I do not know what is doing wrong but my tables are correct, php error is on and not included

Enter image details here

Let me name both Email can be repetitive {$ Html_escape = htmlspecialchars ($ html_escape, ENT_QUOTES | ENT_HTML5, 'UTF-8'); Return $ Html_escape; } $ Name = html_escape ($ _ POST ['name']); $ Email = html_escape ($ _ post ['email']); If empty ($ name) || empty ($ email)) {resonant "and

";}}}}" Gt;

First of all, are you connected to mysql before running your query?

  $ conn = mysql_connect ('localhost', 'your_db_username', 'your_db_password'); If (! $ Conn) {dead ('can not be connected to mysql'); } Mysql_select_db ('your_db_name');  

Then, when you are certain that you are connected to DB and your query is still not working, then add or die (mysql_error ()) This kind of query will help you to understand what is going wrong in your putting:

mysql_query ("INSERT's subs (first_name, email) values ​​('$ Name ',' $ email ') or die (mysql_error ());

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -