GET vs POST in Ajax

GET is designed for getting data from the server. POST (and lesser-known friends PUT and DELETE) are designed for modifying data on the server. A GET request should never cause data to be removed from an application. If you have a link you can click on with a GET to remove data, then Google spidering … Read more

Should I put input elements inside a label element?

From the W3’s HTML4 specification: The label itself may be positioned before, after or around the associated control. <label for=”lastname”>Last Name</label> <input type=”text” id=”lastname” /> or <input type=”text” id=”lastname” /> <label for=”lastname”>Last Name</label> or <label> <input type=”text” name=”lastname” /> Last Name </label> Note that the third technique cannot be used when a table is being … Read more

Reference — What does this symbol mean in PHP?

Incrementing / Decrementing Operators ++ increment operator — decrement operator Example Name Effect ——————————————————————— ++$a Pre-increment Increments $a by one, then returns $a. $a++ Post-increment Returns $a, then increments $a by one. –$a Pre-decrement Decrements $a by one, then returns $a. $a– Post-decrement Returns $a, then decrements $a by one. These can go before or … Read more