When I try to insert a value through PHP coding in a SQL table, I get an error message is. Even I am also building a new database again but it is not working. So I need your help to solve it. My error message is given below:
The entry failed! There is an error in your SQL syntax; The manual that checks the corresponding syntax near'Usage, validity, value) values ('Indrail', 'som', 'WWBIPL_NE_4GB', '512kbps', '4GB', to check compatible with your MySQL server version '3' on line1
My html code is given below:
gt; Top & gt; & lt; Lt; body & gt; & lt; form action = "insert php" method = "post" & gt; & lt; name = select "package" & gt; & lt; option value = "WWBIPL_NE_4GB" & gt; WWBIPL_NE_4GB & Lt; / option & gt; & lt; option value = "WWBIPL_NE_6GB" & gt; WWBIPL_NE_6GB & lt; / option & gt; & lt; / select & gt; First & lt; input type = "text" name = "firstname" & gt; last name: & lt; input type = "text" name = "secondname" & gt; email: & lt; input type = "text" = "Email" & gt; Address: & lt; input type = "text" name = "address" & gt; input type = "presented" & gt; & lt; / form & gt; & lt; / Body & gt; Here is my PHP code
usage
is in a mysql you avoid it baketics Or the name of your column
$ sql = "isuo (first name, last name, package, bandwidth,` use ', validity, value) values (' $ fstname ' , '$ Sndname', '$ value', 'bandwidth', '$ usage', '$ validity', 'price1') $ ";
All you need to do is prepare statements and reasons because XLAnt has written to you that enter ...
with spaces.
No comments:
Post a Comment