article

Sunday, May 30, 2010

CSS Contact Us Form

CSS Contact Us Form

























<style>
.get_a_container
{
background:#dcd9c1;
border:1px solid #000;
padding:12px;
width:25%;
}

.get_a_info
{
overflow:hidden;
background:#ebebeb;
border-bottom:1px solid #d3d3d3;
padding:10px;
line-height:18px;
color:#fffff;
}
.get_a_container_top
{
height:30px;
padding-top:9px;
background-color:#000000;
text-align:left;
color:#FFFFFF;
padding-left:5px;
font-weight:bold;
}

form.sidebar_form
{
overflow:hidden;
padding:10px;
background:#fff;
display:block;
}
.sidebar_form_title
{
font:bold 12px Arial, Helvetica, sans-serif;
color:#202222;
text-transform:uppercase;
margin:0 0 3px;
}
form.sidebar_form input
{
background:#fff;
border:1px solid #aeab91;
width:100%;
height:20px;
margin:0 0 6px;
}
form.sidebar_form textarea
{
background:#fff;
border:1px solid #aeab91;
width:100%;
height:100px;
margin:0 0 10px;
}
form.sidebar_form input.sidebar_form_submit
{
width:204px;
height:41px;
border:0;
display:block;
margin:0 auto;
cursor:pointer;
background:url(images/get_a_fr.gif) top left no-repeat;
font-weight:bold;
color:#FFFFFF;
}
</style>


CONTACT US


contact me and i will try to reach you as soon as possible





Demo

http://creativedesign-mind.com/r-ednalan/demo/css-contact-us-form.html

Download

http://dl.dropbox.com/u/3293191/CSS/css-contact-us-form.zip

CSS Image hover link

CSS Image hover link








<style>
.inner_header_buttons
{
width:206px;
height:48px;
padding:20px;
position:absolute;
top:80px;
left:725px;
background:url(images/seo_head.gif) top left no-repeat;
}
a.inner_header_services_btn, a.inner_header_services_btn:visited
{
width:195px;
height:42px;
background:url(images/inner_he.gif) top left no-repeat;
display:block;
text-indent:-9000px;
margin:0 auto 10px auto;
}
a.inner_header_services_btn, a.inner_header_services_btn:visited
{
width:195px;
height:42px;
background:url(images/inner_he.gif) top left no-repeat;
display:block;
text-indent:-9000px;
margin:0 auto 10px auto;
}
a.inner_header_services_btn:hover
{
background:url(images/inner_hf.gif) top left no-repeat;
}
</style>




Demo

http://creativedesign-mind.com/r-ednalan/demo/css-image-hover.html

Download

http://dl.dropbox.com/u/3293191/CSS/css-image-hover-link.zip

Friday, May 28, 2010

jQuery ContextMenu

jQuery ContextMenu

lightweight jQuery plugin that lets You selectively override the browser’s right-click menu with a custom one of your own.

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

http://www.trendskitchens.co.nz/jquery/contextmenu/

Slimbox 2, the ultimate lightweight Lightbox clone for jQuery

Slimbox 2, the ultimate lightweight Lightbox clone for jQuery

Slimbox 2 is a 4 KB visual clone of the popular Lightbox 2 script by Lokesh Dhakar, written using the jQuery javascript library. It was designed to be very small, efficient, standards-friendly, fully customizable, more convenient and 100% compatible with the original Lightbox 2.

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

http://www.digitalia.be/software/slimbox2#demo

Download

http://www.digitalia.be/software/slimbox2#download

Advanced docking using jQuery

Advanced docking using jQuery

implement multiple docking and undocking functionality.

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

Demo

http://www.jankoatwarpspeed.com/examples/AdvancedDocking/

Download

http://www.jankoatwarpspeed.com/file.axd?file=2009%2f6%2fadvanced_docking.zip

Thursday, May 27, 2010

How to define CakePHP admin routes.

How to define CakePHP admin routes.

find file
app\config\core.php

find below code
/**
* Uncomment the define below to use CakePHP admin routes.
*
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/
Configure::write('Routing.admin', 'admin');

Tuesday, May 25, 2010

cakephp - How remove the query results appears at the bottom

cakephp - How remove the query results appears at the bottom

find the file core.php

app\config\core.php


find above code


* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
* 3: As in 2, but also with full controller dump.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
//Configure::write('debug', 2);
Configure::write('debug', 0);

change the debug to 0 value



Saturday, May 22, 2010

Creating a Digg style signup form with jQuery

Creating a Digg style signup form with jQuery

Digg.com is one of the most popular social networking sites, allowing you to discover and share the content all over the web. In this tutorial we are going to simulate their signup form, with unique features such as their dynamic tooltips that give you a hint on each field that is to be filled. The same approach will be adopted for displaying validation messages. How this form works? When an input field receives focus, a tooltip with a small blue icon is shown under it. On the other hand, if validation fails, an error message is shown in the same place. Both cases are shown on the screenshot below.

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

http://designshack.co.uk/tutorials/creating-a-digg-style-sign-up-form


Demo

http://www.designshack.co.uk/tutorialexamples/diggform/

Download

http://www.designshack.co.uk/tutorialexamples/diggform/diggform.zip

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

Friday, May 21, 2010

Jquery Star Rating widget

Jquery Star Rating widget

The Star Rating widget is a plugin for the jQuery javascript library that creates a non-obstrusive star rating control based on a set of radio input boxes or select options.

http://orkans-tmp.22web.net/star_rating/#demos


Download

http://orkans-tmp.22web.net/star_rating/#demos=&main-menu=4


Twitter-style confirmation message with jQuery

Twitter-style confirmation message with jQuery

One of the cool ways that Twitter interacts with users (when you're not too busy seeing that pesky fail whale!) is how they display their error and confirmation messages. I especially like the clean approach and displaying the messages at the top of the page. If you're looking for a similar approach with your web application or dynamic web site, here's one way you can do it using the jQuery form & some validation.

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

http://www.skyrocketlabs.com/articles/twitter-style-confirmation-message.php

Demo

http://www.skyrocketlabs.com/categories/tutorials/twitter-style-confirmation-message/demo/index.html

Download

http://www.skyrocketlabs.com/categories/tutorials/twitter-style-confirmation-message/twitter-style-confirmation-message.zip

http://dl.dropbox.com/u/3293191/JQUERY/twitter-style-confirmation-message.zip

toggle footer with jQuery & CSS

toggle footer with jQuery & CSS

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

http://dl.dropbox.com/u/3293191/JQUERY/jquery-css-toggle-footer.zip

Twitter-style login with jQuery & CSS3

Twitter-style login with jQuery & CSS3

it works across all browsers...except IE6 and IE7/8 does not apply the CSS3.

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

http://www.skyrocketlabs.com/articles/twitter-style-login-with-jquery-and-css3.php

Demo

http://www.skyrocketlabs.com/categories/tutorials/twitter-style-login-with-jquery-and-css3/demo/index.html


Download

http://www.skyrocketlabs.com/categories/tutorials/twitter-style-login-with-jquery-and-css3/twitter-style-login-with-jquery-and-css3.zip

http://dl.dropbox.com/u/3293191/JQUERY/twitter-style-login-with-jquery-and-css3.zip

Facebook-style navigation menu with jQuery

Facebook-style navigation menu with jQuery

image rollover


image rollover






<style>
#imagerollovermenu {
width: 960px;
height: 72px;
margin: 20px 0 60px 0;
}
#imagerollovermenu a {
float: left;
display: block;
width: 140px;
height: 52px;
text-decoration: none;
margin: 0 12px 0 0;
padding: 0;
}
#imagerollovermenu a.about {
background: url(images/menu4-sprite1.png) 0px 0px no-repeat;
}
#imagerollovermenu a:hover.about {
background: url(images/menu4-sprite1.png) 0px -52px no-repeat;
}
</style>



Demo

http://creativedesign-mind.com/r-ednalan/demo/image_roll_over.html

Download

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

Thursday, May 20, 2010

How to enable error reporting in php?

How to enable error reporting in php?

To avoid this issue, the below code can be placed in the php file for enabling the error message display for the particular page.


error_reporting(E_ALL);
ini_set("display_errors", 1);

Wednesday, May 19, 2010

Animated Hover

Animated Hover get the title attribute and append it to the hover text. If you want to know more and download the source follow the link http://creativedesign-mind.com/r-ednalan/demo/Animated-Menu-Hover.html Download http://dl.dropbox.com/u/3293191/JQUERY/Animated-Menu-Hover.zip

Entire Block Clickable

Entire Block Clickable

Collapsible Panels

Collapsible Panels

This example shows you how to imitate the Gmail inbox panels.

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

http://www.webdesignerwall.com/demo/jquery/collapsible-panels.html

Download

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

jquery Comment Management

jquery Comment Management

This one requires the Color Animations plugin.

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

http://www.webdesignerwall.com/demo/jquery/wordpress-comments.html

Tuesday, May 18, 2010

Jquery Message Box

Jquery Message Box

a css message box that if click the login button a message box display in fade In and by clicking the close button it fade out




<style type="text/css" media="all">
* { padding:0; margin:0; }
.block {
padding-left:50px;
}
.block .message {
padding: 10px 15px 10px 40px;
margin: 10px 0;
font-weight: bold;
overflow: hidden;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
width:30%;
}
.block .message p {
padding: 0;
width: 93%;
float: left;
text-align:left;
}
.block .message.info {
border: 1px solid #bbdbe0;
background: #ecf9ff url(images/info0000.gif) 12px 12px no-repeat;
color: #0888c3;
}
.block .message .close {
display: block;
float: right;
width: 16px;
height: 16px;
background: url(images/close000.png) 0 0 no-repeat;
margin-top: 2px;
cursor: pointer;
-moz-opacity: 0.7;
opacity: 0.7;
}

.block_content {
overflow: hidden;
background: #fff;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 10px 20px 0;
}
</style>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.block .message').hide().append('').fadeIn('slow'); //fade message

$('.block .message .close').click(function() {
$(this).parent().fadeOut('slow', function() { $(this).remove(); }); //close message
});
});
</script>

>?
if (isset($_POST['Login'])){
$message = "

Just click login, this is an example.


";
}

?>


>? echo $message; ?>



















Demo

http://creativedesign-mind.com/r-ednalan/demo/Message_box_message.php

Download

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

CSS text box set focus

CSS text box set focus







<style>
input.text {
width: 35%;
border: 1px solid #BFBFBF;
font-size: 13px;
color: #222;
padding: 5px;
vertical-align: middle;
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
margin-top: 5px;
margin-right: 0px;
margin-bottom: 8px;
margin-left: 0px;
}
input:focus { background-color: #F2F2F2; border: 1px solid #999999;}
input.text.big { width: 30%;}


</style>







Demo

http://creativedesign-mind.com/r-ednalan/demo/CSStext-box-set-focus.html

Monday, May 17, 2010

CSS Jquery Message Box

CSS Jquery Message Box

A css message box that fade out if click the message box









<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Closing Divs - used on Notification Boxes
$(".canhide").click(function() {
$(this).fadeOut(700);
});
});
</script>

<style>
.notification {
line-height: 30px;
cursor: pointer;
clear: both;
height: 30px;
margin: 8px 0px 8px 0px;
padding: 20px 25px 10px 60px;
-moz-border-radius:4px;
-webkit-border-radius: 4px;
}
.notification strong { margin-right: 5px;}
.notification p {
font-size: 11px;
padding: 0px;
margin: 0px;
color: #333333;
}
.message p {
font-size: 11px;
}
.warning {
background-image: url(error000.png);
background-position: 15px center;
background-repeat: no-repeat;
border: 2px solid #FFC237;
background-color: #FFEAA8;
color: #826200;
}
.success {
background-image: url(accept00.png);
background-position: 15px center;
background-repeat: no-repeat;
border: 2px solid #99C600;
background-color: #EFFFB9;
color: #3C5A01;
}
.failure {
background-image: url(exclamat.png);
background-position: 15px center;
background-repeat: no-repeat;
border: 2px solid #EB5339;
background-color: #FCCAC2;
color: #AC260F;
}
.information {
background-image: url(informat.png);
background-position: 15px center;
background-repeat: no-repeat;
border: 2px solid #418ACC;
background-color: #D0E4F4;
color: #235685;
}

</style>


WARNING:
This is a warning message.






INFORMATION:
This is a message for information






SUCCESS:
This is a message for SUCCESS.






FAILURE:
This is a failure message.




Download

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

CSS Message Box with jquery

CSS Message Box with jquery








<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".pane .btn-delete").click(function(){
$(this).parents(".pane").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow")
return false;
});
});
</script>

<style>
.portlet-content { padding: 15px; position: relative; }
.message
{
background: #CCC url(images/icon_not.gif) no-repeat 10px 11px;
font-size: 13px;
color: #74655f;
display:block;
padding:10px 10px 10px 40px;
margin-bottom: 1em;
border: 1px solid #c2beb1;
position:relative;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
}
.message-warning
{
background-color: #fffcd3;
background-image: url(images/error000.png);
color: #74655f;
border-color: #c2beb1;
}
.message-success
{
background-color: #e5f993;
background-image: url(images/accept1.png);
color: #688006;
border-color: #9bac55;
}
.message-info
{
background-color: #d4ebfa;
background-image: url(images/informat.png);
color: #4b6bab;
border-color: #90b1c7;
}
.message-error
{
background-color: #f6b9b9;
background-image: url(images/exclamat.png);
color: #c32727;
border-color: #e18484;
}
.close {
float:right;
font-weight:bold;
}

</style>


Informative Message X




Warning Message X




Success Message X




Error Message X







Download

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

Sunday, May 16, 2010

HTML text editors - Rich Text Editor

HTML text editors - Rich Text Editor

Free Rich Text Editor is a JavaScript WYSIWYG editor.
It can be easily integrate with any platform.
Editor lets you to switch between the design, HTML code & preview modes.

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

http://www.freerichtexteditor.com/

Demo

http://www.freerichtexteditor.com/index.php?inc=demo/index

http://www.freerichtexteditor.com/download/

CSS SUCCESS MESSAGE

CSS SUCCESS MESSAGE




<style>
.message_status
{
margin: 5px 20px 15px 0px;
border: 1px solid #28903A;
padding: 5px;
background-color: #E7FEEF;
}
.message_error img { position: relative; top: 2px; }
</style>

warning
An email has been sent to you with your login information



Download

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

CSS Message

CSS Message










<style>
.success, .fail, .information, .attention {
background-repeat: no-repeat;
background-position: 10px center;
height: 20px;
text-transform: uppercase;
font-size: 11px;
line-height: 22px;
margin-bottom: 20px;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 50px;

}
/* Succes Notification Box */
.success {
background-color: #EBF8D6;
border: 1px solid #A6DD88;
color: #539B2D;
background-image: url(images/accept00.png);
}
/* Failure Notification Box */
.fail {
background-color: #FFECE6;
border: 1px solid #FF936F;
color: #842100;
background-image: url(images/delete00.png);
}
/* Information Notification Box */
.information {
background-color: #D3EEF1;
border: 1px solid #81CDD8;
color: #369CAB;
background-image: url(images/info0000.png);
}
/* Attention Notification Box */
.attention {
background-color: #FFFBCC;
border: 1px solid #FFF35E;
color: #C69E00;
background-image: url(images/warning0.png);
}

/* Notification Close Button */
.close-notification {
width: 16px;
height: 16px;
position: absolute;
background: url(images/close000.png) no-repeat;
top: 4px;
right: 4px;
cursor: pointer;
}
</style>

This is a Success Message


This is an attention box.

This is an failure box.

This is an information box.



Download

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

Image Replacement Gallery

Image Replacement Gallery

Replace the img src attribute with the a href attribute.








<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("h2").append('')
$(".thumbs a").click(function(){
var largePath = $(this).attr("href");
var largeAlt = $(this).attr("title");
$("#largeImg").attr({ src: largePath, alt: largeAlt });
$("h2 em").html(" (" + largeAlt + ")"); return false;
});
});
</script>

<style type="text/css">
body {
margin: 20px auto;
padding: 0;
width: 580px;
font: 75%/120% Arial, Helvetica, sans-serif;
}
h2 {
font: bold 190%/100% Arial, Helvetica, sans-serif;
margin: 0 0 .2em;
}
h2 em {
font: normal 80%/100% Arial, Helvetica, sans-serif;
color: #999999;
}
#largeImg {
border: solid 1px #ccc;
width: 550px;
height: 400px;
padding: 5px;
}
.thumbs img {
border: solid 1px #ccc;
width: 100px;
height: 100px;
padding: 4px;
}
.thumbs img:hover {
border-color: #FF9900;
}
</style>


Large image













Download

http://dl.dropbox.com/u/3293191/JQUERY/ImageReplacement.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.

PHP Frameworks

  • CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code. (This site utilizes CakePHP framework)

    cakephp-framework

  • CodeIgniter is a powerful MVC framework. The official site is well documented and also has an active community of developers.

    codeigniter

  • ZendFramework (ZF) is more of a set of libraries than a MVC (model view controller) framework.


    zend-framework

  • Symfony is a full-stack framework, a library of cohesive classes written in PHP5.

    symfony-framework


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

Related Post