Posted in January 15, 2010 ¬ 11:08 pmh.adminComments Off
How to hide PHP Notice & Warning Messages. The PHP notice errors are frustrating and you are tired of seeing them when you are working on your scripts. They are showed at the beggining of your pages and may reveal confidential information to the visitor like the path to the file or the php file [...]
Read the rest of this entry »
Posted in December 1, 2009 ¬ 12:27 amh.adminComments Off
This is the scenario
<select name=”cars”>
<option value=”volvo”>Volvo</option>
<option value=”audi”>Audi</option>
<option value=”toyota”>Toyota</option>
<option value=”form”>Ford</option>
</select>
This php code – get all everything between <select>
preg_match(’/<select name=”foo”>(.*)<\/select>/msU’,$html,$matches);
print_r($matches);
Read the rest of this entry »
Posted in December 1, 2009 ¬ 12:12 amh.adminComments Off
Here is a a simple code that will force the browser to download a file
Read the rest of this entry »
Posted in October 30, 2009 ¬ 11:18 pmh.adminComments Off
Many websites allow visitors to contribute to the sites’s content through forums, blogs etc . When you’re building such sites, it’s a good idea to provide users with the ability to enhance that content by posting formatted text. Here is a simple example of how to use bbcode with php.
Read the rest of this entry »
Posted in October 30, 2009 ¬ 10:58 pmh.adminComments Off
Use this simple code to validate the usernames in php ( maybe you need to a user registration ). The username will have only characters, numbers and _ (underscore)
Read the rest of this entry »
Posted in October 30, 2009 ¬ 10:49 pmh.adminComments Off
PHP validate email script is an easy way to validate an email address. Use this quick and simple PHP regular expression for email validation.
Read the rest of this entry »
Posted in October 30, 2009 ¬ 10:30 pmh.adminComments Off
One of our clients asked how to display the hits from his website that are stored in a txt file .
First of all we need to search for that specific link and then display the hits.
Read the rest of this entry »