Thursday, May 23, 2013

PHP Login System

Login is a very important part of any website, from securing contents from prying eyes to tracking visitors on your website. This tutorial is a simple login form for a website.Firstly you create "login.php" like this Code: <?php session_start();// This starts the session which is like a cookie,but it isn't saved on your hdd and is much more secure.mysql_connect("localhost","DATABASE USER HERE","PASSWORD");// Connect to the MySQL servermysql_select_db("login"); // Select your Databaseif(isset($_SESSION['loggedin'])) {     die("You are already logged in!"); //...

Tuesday, May 14, 2013

Accessing form elements by name with jQuery

There are a variety of ways to access elements with jQuery including by the name property of form elements (the name="" part of <input name="foo">). This can be useful so you don't have to assign an id to each and every form element as well as a name which is needed to pass the form value to the next page. Example form Here's a snippet of a...

Wednesday, May 8, 2013

jQuery Awesome Datepicker / formatDate

Example :  $(function() { $( "#my_date" ).datepicker({ dateFormat: "MM/dd/yy", defaultDate: "January/01/1970", minDate: "January/01/1925", maxDate: "December/31/2013", changeMonth: true, changeYear: true, ...

Tuesday, May 7, 2013

Twitter Style(glow) Textbox Using Css3

<html> <head> <style type="text/css"> .inputbox{ border-radius:5px; -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; outline:...

Monday, May 6, 2013

PHP MySQL Update Using Forms

<DOCTYPE html> <html> <head> </head> <body> <?php $con=mysqli_connect("localhost","abc","abc456","mydb"); // Check connection if (mysqli_connect_errno())   {   echo "Failed to connect to MySQL: " . mysqli_connect_error();   }     $newname = mysql_real_escape_string( $_POST["fname"] ); if...

php jquery profile edting

<DOCTYPE html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){   $("#save").click(function(){     $("input").attr("readonly",...

Retrieve data from a table || Get value from database php

<?php $con=mysqli_connect("localhost","admin","abc123","mydb"); // Check connection if (mysqli_connect_errno())   {   echo "Failed to connect to MySQL: " . mysqli_connect_error();   } $result = mysqli_query($con,"SELECT * FROM users"); while($row = mysqli_fetch_array($result))   {   $display = $row['firstname'];  ...

Thursday, May 2, 2013

Add Remove Attributes - jQuery

Add new id $(element).attr('id', 'newID'); remove id <img class="thumb" id="thumb" src="img/1_1.jpg" /> $('img#thumb').removeAttr('id'); Example : <DOCTYPE html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){  ...

Page 1 of 1212345Next