To rapidly, and decently, validate email addresses, we can use something like this: The filter_var() returns the filtered data or FALSE if it fails Read about it, and more filters, here: – function filter_var()
So you wrote this awesome php script, that does extreme stuff, but when you run it…it shows nothing. Empty browser. So whats going on? Well, for one, your php error reporting might be turned off by default. So how to turn it on? Read and learn. And forget tomorrow, like me.
This is a bit old but i wanted to add it here so it stays on record. SQL injection is the action to inject SQL code in web forms to perform a site attack and disrupt its services. For a better definition, go read wikipedia here (it even has some code for you to test… Read More »
I was developing an application at work that used amfphp 1.9. All was working until i decided to bring it home to work over the weekend (thats already a bad thing to do right there), and i started getting errors. At work i use windows 7+xampp (with php 5.3.8), at home i use windows 8+xampp… Read More »
This is a recurring problem i had. For some reason (which i later found out), i couldnt get my php scripts to connect to postgresql. The scripts borked at, for example, pg_connect() (unable to find the function, blah blah). First off, usually php doesnt come configured to run the postgresql dll out of the box… Read More »
Before i came up with this solution, i had some trouble formatting and padding decimal numbers, specifically when i want to do it before and after the decimal mark. To top it all, i wanted the result signed (with a plus sign(+) or minus sign(-) depending on the value of the variable) Example: I want… Read More »
This site will contain an archive of all the junk, problems, code snippets, tricks, hacks, solutions and garbage i want to keep to later use, reuse, alter, etc. Hopefully it will be of help to someone else. In portuguese: Este site conterá um arquivo de todas as tralhas, problemas, soluções e lixo que eu vou… Read More »