article

Sunday, May 16, 2010

Simple css message boxes

Simple css message boxes








<style>
.message {
padding: 10px;
border: 2px solid #ddd;
background-color: #eee;
color: #222;
}
.notice {
background: #FFF6BF;
color: #817134;
border-color: #FFD324;
}
.success {
background: #E6EFC2;
color: #529214;
border-color: #C6D880;
}
.error {
background: #FBE3E4;
color: #D12F19;
border-color: #FBC2C4;
}
</style>
this is a notice.

something was successful.

oops! an error occured.


Password Strength Meter Script

Password Strength Meter Script

jQuery password strength meter is a small plugin to jQuery that provides an easy way to show the strength of a user’s (intended) password.

If you want to know more and download the source follow the link

http://simplythebest.net/scripts/ajax/ajax_password_strength.html

Download

http://simplythebest.net/scripts/ajax/ajax_files/jsquery_pstrength.zip

CSS vertical menu hover basic

CSS vertical menu hover basic









<style>
#menu_left {
float: left;
margin: 0 0 6px 0;
padding: 0 0 1px 0;
border-bottom: 2px solid #e2e2e2;
}
#menu_left li { list-style: none; }
#menu_left li a {
display: block;
color: #3F5B7F;
background: #C2CEDE url(arrow.gif) no-repeat center left;
width: 204px;
padding: 7px 23px 7px 23px;
margin: 0 0 1px 0;
font-weight: bold;
text-decoration: none;
}
#menu_left li a:hover { background: #9EB1C9 url(arrow.gif) no-repeat center left; color: #fff; }
</style>

Friday, May 14, 2010

CSS BUTTONS HOVER

CSS BUTTONS HOVERS









<style>
body {
margin:200px;
}
/* trigger button */
#download_now {
background:transparent url(download.png) no-repeat scroll 0 0;
display:block;
height:44px;
margin-bottom:30px;
overflow:hidden;
text-indent:-999em;
width:159px;
cursor:pointer;
}
/* mouseover state */
#download_now:hover {
background-position:0 -44px ;
}
/* clicked state */
#download_now:focus {
background-position:0 -88px;
}
</style>

Download now

Download

http://dl.dropbox.com/u/3293191/CSS/hoverbuttons.zip

Free SEO Tools

Free SEO Tools

Here are some online SEO tools that you can use to check your PageRank, Link Popularity, Search Engine Position, Keyword Density, etc.

Wednesday, May 5, 2010

jQuery Cheat Sheets

jQuery Cheat Sheets

jQuery Cheatsheet- The cheat sheet comes in two flavors: 1) Made for iPhone and iPod Touch, and any other mobile device with internet access. 2) Old-school printable A4 cheat sheet


If you want to know more and download the source follow the link below

http://colorcharge.com/jquery/

Nivo Slider

Nivo Slider

Nivo Slider is a lightweight jQuery plugin for image sliders.

For browsing images, plugin provides a navigation box and next-prev buttons which appear on hover. It also provides auto-slide feature.

If you want to know more and download the source follow the link below

http://nivo.dev7studios.com/

Demo

http://nivo.dev7studios.com/

http://dl.dropbox.com/u/3293191/JQUERY/nivoslider.pack1_.9.zip

PHP MYSQL - INSERT and UPDATE records function

PHP MYSQL - INSERT and UPDATE records function





$record['userid'] = $_GET['iuser'] ;
$record['busid'] = $_GET['busid'] ;
$record['cid'] = $_GET['cid'];
$record['dateprint'] = $dateadd;
$record['noprinted'] = +1;
$record['dateexpire'] = $dateexp;

$dateadd = date("Y-m-d H:m:s");
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("y"));
$xtr = date("Y-m-d",$tomorrow);
$dateexp = $xtr." ".date("H:m:s");

$sqld = "SELECT * FROM dir_coupon_print WHERE busid = '{$_GET['busid']}' AND userid = '{$_GET['iuser']}'";
$result = mysql_query($sqld);
$total = mysql_num_rows($result);//total
//echo $total;
if (mysql_num_rows($result)>0){ //no records founds
while ($rw = mysql_fetch_array($result, MYSQL_ASSOC)){
if (($dateadd >! $rw['dateexpire'])) {
echo "You already consume coupon for this business. wait 24 hours before printing the coupon again. ";
}else{
updateCoupon($rw['id']); //UPDATE RECORDS
}
}
}else {
insertCoupon($record); //INSERT RECORDS
}

function updateCoupon($updateid)
{
$iUserId = intval($iUserId);
$run_sql = "UPDATE dir_coupon_print SET noprinted=noprinted+1 WHERE id = '$updateid'";
$iAlbumId = mysql_query($run_sql) or die( mysql_error()."-cant query");
return $iAlbumId;
}
function insertCoupon($record)
{
$iUserId = intval($iUserId);
$run_sql = "INSERT INTO dir_coupon_print
(userid, cid, busid, dateprint, noprinted, dateexpire)
VALUES ('".$record['userid']."', '".$record['cid']."', '".$record['busid']."', '".$record['dateprint']."', '".$record['noprinted']."', '".$record['dateexpire']."')";
$iAlbumId = mysql_query($run_sql) or die( mysql_error()."-cant query");
return $iAlbumId;
}

Tuesday, May 4, 2010

PHP MYSQL - List Records from database with select box

PHP MYSQL - List Records from database with select box




<select name="cat" class="m_heading" id="cat"?>
<?php
mysql_connect("localhost", "db_user", "db_passwd") or die(mysql_error());
mysql_select_db("db_name") or die(mysql_error());

$result = mysql_query("SELECT * FROM cats WHERE status='1' && type='videos'")
or die(mysql_error());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
$catid = $row['id'];
$catname = $row['name'];
echo "$catname";
}
?>
</select?>

htaccess

.htaccess

.htaccess is a very ancient configuration file that controls the Web Server running your website, and is one of the most powerful configuration files you will ever come across. Htaccess is sometimes called: “HyperText Access” because of its ability to control access of the WWW‘s HyperText Transfer Protocol (HTTP) using Password Protection, Allow and Deny capabilities, and more.

Htaccess files use the default filename “.htaccess” but any unix-style file name can be specified from the main server config using the AccessFileName directive. The file isn’t .htaccess.txt, its literally just named .htaccess.

Creating Htaccess Files

Monday, May 3, 2010

jQuery PhotoShoot Plugin 1.0

jQuery PhotoShoot Plugin 1.0

The jQuery PhotoShoot plugin gives you the ability to convert any div on your web page into a photo shooting effect, complete with a view finder. Hover the mouse over the image,click on the section of the image you like and hey presto your cropped PhotShoot image will appear. excellent plugin.

If you want to know more and download the source follow the link below

http://tutorialzine.com/2010/02/jquery-photoshoot-plugin/


Demo

http://demo.tutorialzine.com/2010/02/photo-shoot-css-jquery/demo.html

Learn How to Validate Forms in both sides using PHP and jQuery

Learn How to Validate Forms in both sides using PHP and jQuery

In this tutorial you are going to learn how to validate your forms using PHP and jQuery in both sides: client side (using javascript with jQuery) and server side (using PHP). It will be interesting to see how to use regular expressions to validate different kind of e-mails, passwords and more.

If you want to know more and download the source follow the link below

http://yensdesign.com/2009/01/how-validate-forms-both-sides-using-php-jquery/


demo

http://yensdesign.com/tutorials/validateform/

Download

http://yensdesign.com/tutorials/validateform/validateform.zip

http://dl.dropbox.com/u/3293191/JQUERY/validateform.zip

JavaScript & AJAX interview questions Part(1)

JavaScript & AJAX interview questions Part(1)

Here are nice collection of basic JavaScript & AJAX interview questions Part(1)
visit here

JavaScript Interview Q/A

JavaScript Interview Q/A

Commonly asked Javascript Interview Questions and Answers here

PHP Interview Questions & Answers

PHP Interview Questions & Answers

Great collection of basic PHP Interview Questions & Answers here

Sunday, May 2, 2010

Mastering-Integrated-HTML-and-CSS

Mastering-Integrated-HTML-and-CSS

Master Hpertext (or Extensible Hypertext) Markup Language (HTML/XHTML) and Cascading Style Sheets (CSS), and You’re well on your way to creating modern, accessible Websites. This comprehensive guide offers integrated instruction in both. You’ll save time and get more productive by learning to structure your (X) HTML content for best effect with CSS styles, from the start.Using the latest standards, best practices, and real-world examples, web expert Virginia DeBolt offers a thorough grounding in the basics plus advanced techniques for those who want to improve their current skills or learn more modern ways of working. You’ll find out how to create websites that are accessible to the widest range o visitors, learn the latest specs, build CSS for print and handheld devices, and work with a variety of CSS-based layouts.

If you want to know more and download the source follow the link below

http://socifiles.com/d/747058


Cheats Sheets for Designers n Developers

Cheats Sheets for Designers n Developers

If you are a web developers and designers, and you are working on multiple programming languages and different frameworks then you must need cheat sheets to enhance and fast your work.

If you want to know more and download the source follow the link below

http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/

http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/images/html5-cheat-sheet/preview.gif

jQuery and Google Maps Tutorial: The Basics

jQuery and Google Maps Tutorial: The Basics

If you have never worked with the Google Map API before it can all seem daunting. What you need is a step-by-step guide that will cover the basics and give you a better understanding of everything that is going on, and that is what this tutorial covers.

If you want to know more and download the source follow the link below

http://marcgrabanski.com/article/jquery-google-maps-tutorial-basics

Demo

http://marcgrabanski.com/webroot/resources/jquery-ui-google-maps/tutorial-part1.html

PHP MYSQL - MySQL Average

PHP MYSQL - MySQL Average







MySQL Average
The AVG function returns the average value for the specified column of a group.



<?php
$con = mysql_connect("localhost","root","ednalan");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$query = "SELECT type, AVG(price) FROM products GROUP BY type"; //GROUP BY type
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
echo "The average price of ". $row['type']. " is $".$row['AVG(price)'];
echo "
";
}

?>
//display
//The average price of Food is $8.730000

PHP MYSQL Basic

PHP MYSQL Basic

What is PHP?

PHP stands for PHP: Hypertext Preprocessor
PHP is a server-side scripting language, like ASP
PHP scripts are executed on the server
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
PHP is an open source software
PHP is free to download and use

What is MySQL?

MySQL is a database server
MySQL is ideal for both small and large applications
MySQL supports standard SQL
MySQL compiles on a number of platforms
MySQL is free to download and use







mysql_connect

$con = mysql_connect("localhost","root","ednalan");
mysql_select_db("dbednalan", $con);
$sql = mysql_query("select * from dir_buscoupon WHERE busid = '{$_GET['busid']}'");
$rs = mysql_fetch_array($sql);
$id = $rs["id"];
$img = $rs["img"];


mysql_fetch_array

//1. list records where condition
$sql = mysql_query("select * from registrations WHERE id='$id'" ORDER BY asign_number Asc); ///////DESC Limit 5";
$rs = mysql_fetch_array($sql);
$id = $rs["id"];
$email = $rs["email"];

//2. while loop
define("REGISTRATION", "registration");
$sql_welcome = "SELECT * FROM ".REGISTRATION;
$sql_result = mysql_query($sql_welcome) or die("Could not connect");
while ($sql_row= mysql_fetch_array($sql_result, MYSQL_ASSOC)){
echo $sql_row['welcome'];
}
$sql="Select * From dbisubcategory";
$db_query=mysql_query($sql) or die("Could not requery");
while ($result=mysql_fetch_array($db_query, MYSQL_ASSOC))
{
$About=$result['id'];
echo($About);
}
//3 where condition
$result=mysql_query("SELECT * FROM gb_users where status='admin'") or die('Error 3- No database found.');
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$mail=$row['email'];

//4. Define table in view records in table
define("ABOUT", "tblabout");
$sql_announcement = "SELECT * FROM ".ABOUT." WHERE id=4";
$sql_result = mysql_query($sql_announcement) or die("Could not connect");
echo "";
while ($sql_row= mysql_fetch_array($sql_result, MYSQL_ASSOC)){
echo "

";
}
echo "

$sql_row[About]
";

//5 get variables
$sql = mysql_query("select * from dir_buscoupon WHERE busid = '{$_GET['busid']}' AND id = '{$_GET['id']}'");
$rs = mysql_fetch_array($sql);
$id = $rs["id"];
$img = $rs["img"];




mysql_fetch_assoc

$qry = mysql_query("SELECT * FROM events WHERE id = '$event_id'") or die(mysql_error());
$rows = mysql_fetch_assoc($qry);
$event = $rows['name'];


mysql_num_rows

$sqld = "SELECT * FROM dir_coupon_print WHERE busid = '{$_GET['busid']}' AND userid = '{$_GET['iuser']}'";
$result = mysql_query($sqld);
$total = mysql_num_rows($result);//total
//echo $total;
if (mysql_num_rows($result)>0){ //no records founds
while ($rw = mysql_fetch_array($result, MYSQL_ASSOC)){
if (($dateadd >! $rw['dateexpire'])) {
echo "You already consume coupon for this business. wait 24 hours before printing the coupon again. ";
}else{
updateCoupon($rw['id']); //UPDATE RECORDS
}
}
}else {
insertCoupon($record); //INSERT RECORDS
}


Related Post