php - Leading space with INSERT in MySql -
I am making search results pages with PHP; MySql.When you visit the state page, you should call it in every city in which my record is, it will not list any city for the cities column if they have a leading white spot.
I trim the variable before entering the database.
$ prcity = trim ($ _SESSION ['prcity']);
However, I have a leading white spot in the column. On the result page of a particular state will show a city that I go to every record and remove the leading whitespace.
In addition, I have an array in such a form that I throws this warning message
Warning: implode () [function.implode]: in line Invalid argument passed to: \ wamp \ www \ mydomain.com \ register \ checkform.php 48
If I use this bit code if (! $ Error string) {foreach ($ _POST as $ key = & gt; $ value) {$ value = ltrim ($ value); $ _SESSION [$ key] = $ value;}
To touch white space for INSERT or throw a clue w / o warning on filtering white space on search result?
resonance ("& lt; a class = \" city_search \ "href = \" ../ search_results.php? Search = ". $ Line ['prcity']." & Amp ; Prstate = ". $ Search" "$" ['Prcity']. "& Lt; / a & gt;"}}}
Chris,
MySQL has a function so that you can ensure that the data is correct.
Seti city = Trium (city)
can update all your city so that your database will be repaired
Comments
Post a Comment