July 28th in PHP Scripts by pbu .

How to filter & escape data from Injection attacks in PHP!

Ask any security expert! He will say you should always filter POST and GET data by escaping them before insertion into the database. In that way your scripts can be safe from SQL injection attacks.

Many php programmers are so lazy and just directly insert the POST data without filtering it like

mysql_query("INSERT into `users` (`name`,`email`) VALUES (‘$_POST[name]‘,’$_POST[email]‘)"):

which is truly a bad example of not checking input data. Detect and protect important data from fraudulent access by having data security software

A very …

July 27th in Linux/Unix, PHP Scripts by pbu .

Using htaccess to redirect domain without http://

Using htaccess to redirect domain without http

A very simple problem made me to sweat a lot. I have a site where users post their website link and most of them are so dumb and just wont put http:// in their domain and they submit just like www.domain.com.

If the link goes live in my website it wont get redirected and merely 404 file not found error pops up and the URL looks like http://mysite.com/www.domain.com

i know i could check http with regular …

July 17th in Games by pbu .

Killing Goliath with Missiles in Resistance 2

Killing Goliath with Missiles in Resistance 2

I was stuck at this part of game where i had to fire missiles at the exhaust of Goliath and no matter how many times i fire the missile i am struck by rapid firing of rockets. I had tried this over hundred times and seems no way of bringing Goliath down.

Sooner i found out how easy it was! There was no need to bring Goliath down and you just have to run. Here …

July 15th in Javascript by pbu .

Quick & Easy Form Validation Tutorial with JQuery

Quick & Easy Form Validation with JQuery

Form validation has become never been easy like before. If you havent heard of jQuery, then its time to get know now. Jquery is an open source set of javascript library, that brings user interactivity in web applications so easy even for a beginner with just few lines of code.

In this tutorial, i am going to show how easy to validate a form with jquery. For this you will need to download

JQuery Library …

July 13th in Javascript by pbu .

how to strip special characters with jQuery form validation!

JQuery form validation – How to remove special characters!

i was using a jquery form validation plugin and it was so easy in validating a form. I was stuck in a scenario where i want users to register userID and i dont want them to enter special characters like dots and just want them to enter alphabets, number and underscore in the username.

I went through the documentation of the plugin and there was no such methods to strip the special …

July 12th in Javascript by pbu .

how to reload/refresh a page with jquery?

how to reload/refresh a page with jquery?

Its very simple.

Lets say you have a button refresh all, which basically does reloading the page when you click it. Here is the code

// use location.reload() in jquery to reload a page within onclick
<input name="doRefresh" type="button" id="doRefresh"
value="Refresh All" onClick="location.reload();">

July 12th in Javascript by pbu .

Fix-> JQuery onclick browser jumps to top of page!

JQuery onclick jumps to top of page

i had an issue with jquery code where i have a html link doing specific tasks for onclick event. Since the appear on bottom of my page, when i click on the link the browser jumps to top of the page every time i click.

<a href="#" onclick="dofunct()">click me</a>

This is really very frustrating as everytime i click a link, the browser jumps to top of page. After a long search, i fixed the problem by …

July 12th in Javascript by pbu .

how to call a php script from javascript?

how to call a php script from javascript?

I have always wondered how to call a php script and send GET data from javascript code. It was very important for me as in many projects i have worked i never wanted to header redirect to original php page after delete, edit operations which is really a mess.

jQuery has revolutionized the way we look at javascript and it has certainly bridged the javascript(client side) and php (server side).

so how do you …

July 9th in Games by pbu .

Wheelman is another GTA like game! WOW

Wheelman is another GTA like game!

Wheelman ROCKS! It is high flying, action packed GTA like racing game and i can say WOW! The game has great graphics and creators of the game brought in such a innovation in action racing like melee, air jacking and precision aiming. Awesome! I havent seen that before!

The game goes on like you will be in barcelona and taking on gang leaders one by one with number of missions. The part i liked most …

July 6th in PHP Scripts by pbu .

PHP script using mail() vs smtp?

PHP script using mail vs smtp method for emailing

I have often confused about the which method to use for sending mails with a php script. I have used php mail() function in many projects and it is often slow, which is because this function opens sockets everytime you call this function. This doesnt work if you are mass emailing and smtp or sendmail is the way to go.

The best and fast way of sending email is using

- SMTP (faster)
- …

 Page 1 of 2  1  2 »