Many sites have signup pages. Every programmers try to make the signup pages attractive by adding stylish input CSS codes and others. Why not add a stylish username availability checker ? It’s very easy to add and will work on jQuery versions 1.2 and up. I’m also going to tell you how to check if username is available in the server side. Of course it’s PHP. The checking is SQL Injection free too. For Executing SQL queries we will use PHP PDO.
... [READ MORE]How To Create A HTML, CSS, JS Code Editor Using jQuery
There are a lot of HTML editing services in the Web. Some of the popular services are JsFiddle and JsBin. These sites offer saving function to your account too. If you want to create a site like JSFiddle, then you are at the right place. I’m going to tell you how to create a basic HTML editing software using jQuery.
The editor we’re going to create also has a live preview service which means that the user don’t have to submit the code form every time. The preview is automatically updated using jQuery‘s keyup trigger except for **JS **code update, because Javascript can’t be added every time when user types something because there will be syntax errors.
... [READ MORE]Create Your Own URL Shortening Service Using PHP & jQuery
Automatically Redirect A Blogger Blog To Another URL
So Let’s begin.
Go to Blogger -> Blog to be redirected -> Template -> Edit HTML.
You will get a box with a lot of text. Use one of the following methods to redirect :
Upload Image To Remote Server With PHP cURL & Handle File in Remote Server
For this submission we will use 2 files :
- form.php – The Page Where we will show the client the form. This file also sends the uploaded data to the external server.
- handle.php – The Page on the external server which receives the uploaded data from form.php using cURL.
We won’t copy the uploaded file by the client to our server, instead we will directly send the file to the external server. For sending we will encrypt the file with base64.
OK. Lets’ Start. First, Let’s create the FORM page :
Setting Iframe height to its content height using Javascript
function getDocHeight(doc) {
... [READ MORE]
doc = doc || document;
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function setIframeHeight(id) {
var ifrm = id;
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
ifrm.style.visibility = ‘hidden’;
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
// some IE versions need a bit added or scrollbar appears
ifrm.style.height = getDocHeight( doc ) + 4 + "px";
ifrm.style.visibility = ‘visible’;
}
Create MySQL Injection free Secure Login System in PHP
There were a lot of people who created tutorials to create a PHP Login System. But they were all vulnerable to MySQL Injection. In this post I’m going to demonstrate a login system free of this vulnerability. It is very secure. There are mysqli and PDO in PHP to escape these injections. We are going to use **PDO ( PHP Data Object **).
UPDATE – logSys
There is a new, free, better Advanced Login System which you can check out here.
... [READ MORE]Setting Infinite Width on an element – HTML
This will only work on the main parent elements such as elements with display property as follows:
- block
- table
- inline-block
So now you know what are the main parent elements. Now back to the point, to add infinite width set the white-space property to the value nowrap. Example:
... [READ MORE]Fix: Dynamic Views failed to load properly
Vertically center align an element using CSS
Here is the code of a div aligned vertically.
#adiv{
display:inline-block;
vertical-align:middle;
}
This only works for div with the display property inline-block and some others which I don’t know. But it’s better to use inline-block.