Archive for April 2008

Here it is, an AJAX’d contact form with a captcha. I had an idea to code this about a week ago and thought would be a tough job to do but it wasn’t that tough to code when I started doing it. The only place where I had to spend a lot of time was, pondering how to pass the value from the ‘textarea’ to the PHP preserving the line breaks. After googling for about an hour and reading different articles I finally got what was required, I just had to escape(): the variable before sending it to the PHP script.

On a positive note, I didn’t really have any problem with running this script on IE (I usually have to break my head over this matter). To prelude its features, I guess it does everything you’d normally except a contact form to do. It sanitizes all the variables, checks for the Email structure and disabled the submit button once the email is sent to prevent mass emails. I would like to thank SecondVersion and Psyrens for the PHP backend & ajax captcha respectively. As usual I’m lazy to provide a detailed documentation about it and would *make sure* that I write one in the future. But the whole script isn’t obfuscated at all, you’d just have to edit some constants and woo! it’s done.

I’m currently working on integrating this script as a wordpress plugin. Please let me know any bugs/commments/feedback by commenting below or contacting me. Show-off your own modified version of this script here :P

Script Demo : http://hakc.net/ajax-contact-form-captcha-demo/

Script Download : http://hakc.net/…./….zip

I’ve finally become free from a voyage that many idiots including me embarked about a year ago. I’m finally completely sane. I had decided long back to write a blog entry on “why orkut sucks” and I think this is the perfectly right time to do it. So this isn’t the way you’d normally expect a person to prelude his blog after months of inactivity and if you’re one of those ‘pro orkut lover’ you wouldn’t indeed like this. Yeah, and this is my first “hate rant”.

I don’t have anything against most of the social networking sites out there (probably because I don’t visit many) but orkut is something which just rages me to the core. I find it ridiculous that it’s a big “phenomenon” in India (I would infact rate Chris Crocker’s videos more than this crap).

PS : Parental advisory :P, entry is a bit profane.

» Read more after the jump →