Timeline for Form validation using AJAX with PHP fallback
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 7, 2016 at 1:57 | history | edited | Jamal | CC BY-SA 3.0 | deleted 237 characters in body; edited tags; edited title |
| Jun 27, 2012 at 12:33 | vote | accept | Joseph Duffy | ||
| May 17, 2012 at 16:35 | answer | added | mseancole | timeline score: 4 | |
| May 16, 2012 at 18:26 | comment | added | Corbin | I'm feeling too lazy at the moment to write a proper answer, so a few pointers: Don't compare a boolean to it's string equivalent. Either do if ($a) or if ($a === true) or if (!$a) or if ($a === false) (if you know it's a boolean, I'd tend towards the === options). Pass your DB instance to the validate_input function. You're unnecessarily tying your validate_input function to mysqlConnect(). A random function should not be responsible for setting up a DB connection. And lastly, validate_input is doing way too much. Try to break it into smaller logical functions. | |
| May 16, 2012 at 15:28 | history | asked | Joseph Duffy | CC BY-SA 3.0 |