tangwaichee
03-16-2010, 05:34 PM
Hi all,
when the user enter its userid and password to login into the web, it successfully works, but if the user wish to logout, what coding i need to insert it.anyone could give me a hand on it?
thanks
[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cart-Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="shortcut icon" href="http://cart-test.com/product_images/favicon.ico" />
<link href="http://cart-test.com/templates/default/Styles/styles.css?1" media="all" type="text/css" rel="stylesheet" />
<link href="http://cart-test.com/templates/default/Styles/iselector.css?1" media="all" type="text/css" rel="stylesheet" />
<link href="http://cart-test.com/templates/default/Styles/blue.css?1" media="all" type="text/css" rel="stylesheet" />
<!--[if IE]><link href="http://cart-test.com/templates/default/Styles/ie.css?1" media="all" type="text/css" rel="stylesheet" /><![endif]-->
<!-- Tell the browsers about our RSS feeds -->
<link rel="alternate" type="application/rss+xml" title="Latest News (RSS 2.0)" href="http://cart-test.com/rss.php?action=newblogs&type=rss" />
<link rel="alternate" type="application/atom+xml" title="Latest News (Atom 0.3)" href="http://cart-test.com/rss.php?action=newblogs&type=atom" />
<link rel="alternate" type="application/rss+xml" title="New Products (RSS 2.0)" href="http://cart-test.com/rss.php?type=rss" />
<link rel="alternate" type="application/atom+xml" title="New Products (Atom 0.3)" href="http://cart-test.com/rss.php?type=atom" />
<link rel="alternate" type="application/rss+xml" title="Popular Products (RSS 2.0)" href="http://cart-test.com/rss.php?action=popularproducts&type=rss" />
<link rel="alternate" type="application/atom+xml" title="Popular Products (Atom 0.3)" href="http://cart-test.com/rss.php?action=popularproducts&type=atom" />
<!-- Include visitor tracking code (if any) -->
<script type="text/javascript" src="http://cart-test.com/index.php?action=tracking_script"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/jquery.js?1"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/menudrop.js?1"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/common.js?1"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/iselector.js?1"></script>
<script type="text/javascript">
//<![CDATA[
config.ShopPath = 'http://cart-test.com';
config.AppPath = '';
var ThumbImageWidth = 120;
var ThumbImageHeight = 120;
//]]>
</script>
<script type="text/javascript" src="http://cart-test.com/javascript/quicksearch.js"></script>
</head>
<body>
<div id="Container">
<div id="AjaxLoading"><img src="http://cart-test.com/templates/default/images/ajax-loader.gif" alt="" /> Loading... Please wait...</div>
<div id="TopMenu">
<ul style="display:">
<li style="" class="HeaderLiveChat">
</li>
<li style="display:" class="First"><a href="http://cart-test.com/account.php">My Account</a></li>
<li style="display:"><a href="http://cart-test.com/orderstatus.php">Order Status</a></li>
<li style="display:"><a href="http://cart-test.com/wishlist.php">Wish Lists</a></li>
<li><a href="http://cart-test.com/giftcertificates.php">Gift Certificates</a></li>
<li style="display:" class="CartLink"><a href="http://cart-test.com/cart.php">View Cart <span></span></a></li>
<li style="display:">
<div>
<a href='http://cart-test.com/login.php' onclick=''>Sign in</a> or <a href='http://cart-test.com/login.php?action=create_account' onclick=''>Create an account</a>
</div>
</li>
</ul>
<br class="Clear" />
</div>
<div id="Outer">
<div id="Header">
<div id="Logo">
<div id="LogoContainer">
<h1><a href="http://cart-test.com/"><span class="Logo1stWord">Cart-Test</span></a></h1>
</div>
</div>
<div id="SearchForm">
<form action="http://cart-test.com/search.php" method="get" onsubmit="return check_small_search_form()">
<label for="search_query">Search</label>
<input type="text" name="search_query" id="search_query" class="Textbox" value="" />
<input type="image" src="http://cart-test.com/templates/default/images/blue/Search.gif" class="Button" />
</form>
<p>
<a href="http://cart-test.com/search.php?mode=advanced"><strong>Advanced Search</strong></a> |
<a href="http://cart-test.com/search.php?action=Tips">Search Tips</a>
</p>
</div>
<script type="text/javascript">
var QuickSearchAlignment = 'left';
var QuickSearchWidth = '232px';
lang.EmptySmallSearch = "You forgot to enter some search keywords.";
</script>
<br class="Clear" />
</div>
<div id="Menu">
<ul>
<li class="First ActivePage"><a href="http://cart-test.com/"><span>Home</span></a></li>
<li class=" ">
<a href="http://cart-test.com/pages/Information.html"><span>Information</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/giftcertificates.php"><span>Gift Certificate</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Products.html"><span>Products</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/New-Arrivals.html"><span>New Arrivals</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Promotions-Items.html"><span>Promotions Items</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Hot-Items.html"><span>Hot Items</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Clearance-Items.html"><span>Clearance Items</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Wholesales.html"><span>Wholesales</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Support.html"><span>Support</span></a>
</li>
</ul>
</div>
<div id="Wrapper">
<div class="Left" id="LayoutColumn1">
<div class="Block CategoryList Moveable Panel" id="SideCategoryList">
<h2>Categories</h2>
<div class="BlockContent">
<ul>
<li class=""><a href="http://cart-test.com/categories/Testonly/">Testonly</a>
</li>
</ul>
</div>
</div>
<div class="Block NewsletterSubscription Moveable Panel" id="SideNewsletterBox">
<h2>
Our Newsletter
</h2>
<div class="BlockContent">
<form action="http://cart-test.com/subscribe.php" method="post" id="subscribe_form" name="subscribe_form">
<input type="hidden" name="action" value="subscribe" />
<label for="nl_first_name">Your First Name:</label>
<input type="text" class="Textbox" id="nl_first_name" name="nl_first_name" />
<label for="nl_email">Your Email Address:</label>
<input type="text" class="Textbox" id="nl_email" name="nl_email" /><br />
<input type="image" src="http://cart-test.com/templates/default/images/blue/NewsletterSubscribe.gif" value="Subscribe" class="Button" />
</form>
</div>
</div>
<script type="text/javascript">
// <!--
$('#subscribe_form').submit(function() {
if($('#nl_first_name').val() == '') {
alert('You forgot to type in your first name.');
$('#nl_first_name').focus();
return false;
}
if($('#nl_email').val() == '') {
alert('You forgot to type in your email address.');
$('#nl_email').focus();
return false;
}
if($('#nl_email').val().indexOf('@') == -1 || $('#nl_email').val().indexOf('.') == -1) {
alert('Please enter a valid email address, such as john@example.com.');
$('#nl_email').focus();
$('#nl_email').select();
return false;
}
// Set the action of the form to stop spammers
$('#subscribe_form').append("<input type=\"hidden\" name=\"check\" value=\"1\" \/>");
return true;
});
// -->
</script>
when the user enter its userid and password to login into the web, it successfully works, but if the user wish to logout, what coding i need to insert it.anyone could give me a hand on it?
thanks
[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cart-Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="shortcut icon" href="http://cart-test.com/product_images/favicon.ico" />
<link href="http://cart-test.com/templates/default/Styles/styles.css?1" media="all" type="text/css" rel="stylesheet" />
<link href="http://cart-test.com/templates/default/Styles/iselector.css?1" media="all" type="text/css" rel="stylesheet" />
<link href="http://cart-test.com/templates/default/Styles/blue.css?1" media="all" type="text/css" rel="stylesheet" />
<!--[if IE]><link href="http://cart-test.com/templates/default/Styles/ie.css?1" media="all" type="text/css" rel="stylesheet" /><![endif]-->
<!-- Tell the browsers about our RSS feeds -->
<link rel="alternate" type="application/rss+xml" title="Latest News (RSS 2.0)" href="http://cart-test.com/rss.php?action=newblogs&type=rss" />
<link rel="alternate" type="application/atom+xml" title="Latest News (Atom 0.3)" href="http://cart-test.com/rss.php?action=newblogs&type=atom" />
<link rel="alternate" type="application/rss+xml" title="New Products (RSS 2.0)" href="http://cart-test.com/rss.php?type=rss" />
<link rel="alternate" type="application/atom+xml" title="New Products (Atom 0.3)" href="http://cart-test.com/rss.php?type=atom" />
<link rel="alternate" type="application/rss+xml" title="Popular Products (RSS 2.0)" href="http://cart-test.com/rss.php?action=popularproducts&type=rss" />
<link rel="alternate" type="application/atom+xml" title="Popular Products (Atom 0.3)" href="http://cart-test.com/rss.php?action=popularproducts&type=atom" />
<!-- Include visitor tracking code (if any) -->
<script type="text/javascript" src="http://cart-test.com/index.php?action=tracking_script"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/jquery.js?1"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/menudrop.js?1"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/common.js?1"></script>
<script type="text/javascript" src="http://cart-test.com/javascript/iselector.js?1"></script>
<script type="text/javascript">
//<![CDATA[
config.ShopPath = 'http://cart-test.com';
config.AppPath = '';
var ThumbImageWidth = 120;
var ThumbImageHeight = 120;
//]]>
</script>
<script type="text/javascript" src="http://cart-test.com/javascript/quicksearch.js"></script>
</head>
<body>
<div id="Container">
<div id="AjaxLoading"><img src="http://cart-test.com/templates/default/images/ajax-loader.gif" alt="" /> Loading... Please wait...</div>
<div id="TopMenu">
<ul style="display:">
<li style="" class="HeaderLiveChat">
</li>
<li style="display:" class="First"><a href="http://cart-test.com/account.php">My Account</a></li>
<li style="display:"><a href="http://cart-test.com/orderstatus.php">Order Status</a></li>
<li style="display:"><a href="http://cart-test.com/wishlist.php">Wish Lists</a></li>
<li><a href="http://cart-test.com/giftcertificates.php">Gift Certificates</a></li>
<li style="display:" class="CartLink"><a href="http://cart-test.com/cart.php">View Cart <span></span></a></li>
<li style="display:">
<div>
<a href='http://cart-test.com/login.php' onclick=''>Sign in</a> or <a href='http://cart-test.com/login.php?action=create_account' onclick=''>Create an account</a>
</div>
</li>
</ul>
<br class="Clear" />
</div>
<div id="Outer">
<div id="Header">
<div id="Logo">
<div id="LogoContainer">
<h1><a href="http://cart-test.com/"><span class="Logo1stWord">Cart-Test</span></a></h1>
</div>
</div>
<div id="SearchForm">
<form action="http://cart-test.com/search.php" method="get" onsubmit="return check_small_search_form()">
<label for="search_query">Search</label>
<input type="text" name="search_query" id="search_query" class="Textbox" value="" />
<input type="image" src="http://cart-test.com/templates/default/images/blue/Search.gif" class="Button" />
</form>
<p>
<a href="http://cart-test.com/search.php?mode=advanced"><strong>Advanced Search</strong></a> |
<a href="http://cart-test.com/search.php?action=Tips">Search Tips</a>
</p>
</div>
<script type="text/javascript">
var QuickSearchAlignment = 'left';
var QuickSearchWidth = '232px';
lang.EmptySmallSearch = "You forgot to enter some search keywords.";
</script>
<br class="Clear" />
</div>
<div id="Menu">
<ul>
<li class="First ActivePage"><a href="http://cart-test.com/"><span>Home</span></a></li>
<li class=" ">
<a href="http://cart-test.com/pages/Information.html"><span>Information</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/giftcertificates.php"><span>Gift Certificate</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Products.html"><span>Products</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/New-Arrivals.html"><span>New Arrivals</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Promotions-Items.html"><span>Promotions Items</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Hot-Items.html"><span>Hot Items</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Clearance-Items.html"><span>Clearance Items</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Wholesales.html"><span>Wholesales</span></a>
</li> <li class=" ">
<a href="http://cart-test.com/pages/Support.html"><span>Support</span></a>
</li>
</ul>
</div>
<div id="Wrapper">
<div class="Left" id="LayoutColumn1">
<div class="Block CategoryList Moveable Panel" id="SideCategoryList">
<h2>Categories</h2>
<div class="BlockContent">
<ul>
<li class=""><a href="http://cart-test.com/categories/Testonly/">Testonly</a>
</li>
</ul>
</div>
</div>
<div class="Block NewsletterSubscription Moveable Panel" id="SideNewsletterBox">
<h2>
Our Newsletter
</h2>
<div class="BlockContent">
<form action="http://cart-test.com/subscribe.php" method="post" id="subscribe_form" name="subscribe_form">
<input type="hidden" name="action" value="subscribe" />
<label for="nl_first_name">Your First Name:</label>
<input type="text" class="Textbox" id="nl_first_name" name="nl_first_name" />
<label for="nl_email">Your Email Address:</label>
<input type="text" class="Textbox" id="nl_email" name="nl_email" /><br />
<input type="image" src="http://cart-test.com/templates/default/images/blue/NewsletterSubscribe.gif" value="Subscribe" class="Button" />
</form>
</div>
</div>
<script type="text/javascript">
// <!--
$('#subscribe_form').submit(function() {
if($('#nl_first_name').val() == '') {
alert('You forgot to type in your first name.');
$('#nl_first_name').focus();
return false;
}
if($('#nl_email').val() == '') {
alert('You forgot to type in your email address.');
$('#nl_email').focus();
return false;
}
if($('#nl_email').val().indexOf('@') == -1 || $('#nl_email').val().indexOf('.') == -1) {
alert('Please enter a valid email address, such as john@example.com.');
$('#nl_email').focus();
$('#nl_email').select();
return false;
}
// Set the action of the form to stop spammers
$('#subscribe_form').append("<input type=\"hidden\" name=\"check\" value=\"1\" \/>");
return true;
});
// -->
</script>