Hide last digits of phone number like 99XX XXX XXX PHP or jQuery

I have this code that outputs the var $phone. items->phone; ?> Which outputs: 9999 999 999. I want it to …

Execute PHP function with onclick

I am searching for a simple solution to call a PHP function only when a-tag is clicked. PHP: function removeday() { … } HTML: Delete

How to Load Ajax in WordPress

I’m familiar with using ajax in the ordinary way with jQuery. I’ve played around it for a while, but don’t understand what Wordpress needs to get it to work… What I have here is taken from some …

How to save an HTML5 Canvas as an image on a server?

I’m working on a generative art project where I would like to allow users to save the resulting images from an algorithm. The general idea is: Create an image on an HTML5 Canvas using a generative …

Send the download link of the uploaded file in a mail

I am using the “jquery file upload plugin” in my website. The plugin give me a feature to download the file after uploaded it, and here’s the code

<a …

How to stop jQuery .ajax() execution when success is false?

I have this code which works. $.ajax({ type: “GET”, url: “includes/process.php”, data: “captcha=” + captcha, success: function(data) { if(data == ‘true’) …

How to set a session variable when clicking a link

I have the following problem… I want to set a session variable when clicking on a normal link like: home My research seems to point out that it is not …

Is an X-Requested-With header server check sufficient to protect against a CSRF for an ajax-driven application?

I’m working on a completely ajax-driven application where all requests pass through what basically amounts to a main controller which, at its bare bones, looks something like this: if(strtolower($…