Archive for May 12, 2008

Ajax form submit

form-submit.html

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
<HTML>
<HEAD>
<title>Demo: Ajax form submit</title>
<script type=”text/javascript” src=”js/form-submit.js”></script>
<script type=”text/javascript” src=”js/ajax.js”></script>
<style type=”text/css”>
body{
margin:0px;
font-size:0.8em;
font-family:Trebuchet MS
}
#mainContainer{
width:840px;
margin:5px;
}
table,tr,td{
vertical-align:top;
}
.textInput{
width:300px;
}
html{
margin:0px;
}
.formButton{
width:75px;
}
textarea,input,select{
font-family:Trebuchet MS;
}
i{
font-size:0.9em;
}
</style>
</head>
<body>

<div id=”mainContainer” style=”">
<fieldset>
<legend>Ajax form submit</legend>
<form action=”someplace.html” method=”post” name=”myForm”>
<div id=”formResponse”>
<table>
<tr>
<td><label for=”firstname”>First name:</label></td>
<td id=”_firstname”></td>
<td><input type=”text” class=”textInput” name=”firstname” id=”firstname”></td>
</tr>
<tr>
<td><label for=”lastname”>Last name:</label></td>
<td id=”_lastname”></td>
<td><input type=”text” class=”textInput” name=”lastname” id=”lastname”></td>
</tr>
<tr>
<td><label for=”address”>Address:</label></td>
<td id=”_address”></td>
<td><textarea class=”textInput” name=”address”></textarea></td>
</tr>
<tr>
<td><label for=”zipCode”>Zip code:</label>
<td id=”_zipCode”></td>
<td><input type=”text” name=”zipCode” size=”10″ id=”zipCode” minLength=”4″ maxlength=”10″></td>
</tr>
<tr>
<td><label for=”age”>Age:</label></td>
<td id=”_age”></td>
<td><input type=”text” name=”age” id=”age” maxlength=”3″ size=”3″ minlength=”2″></td>
</tr>
<tr>
<td><label for=”email”>Email:</label></td>
<td id=”_email”></td>
<td><input class=”textInput” type=”text” name=”email” id=”email” maxlength=”255″></td>
</tr>
<tr>
<td><label for=”url”>Url:</label></td>
<td id=”_url”></td>
<td><input class=”textInput” type=”text” name=”url” id=”url” maxlength=”255″></td>
</tr>
<tr>
<td><label for=”alpha”>Alpha chars:</label></td>
<td id=”_alpha”></td>
<td><input type=”text” class=”textInput” id=”alpha” name=”alpha” maxlength=”255″></td>
</tr>
<tr>
<td><label for=”custom”>Code:</label></td>
<td id=”_custom”></td>
<td><input type=”text” class=”textInput” id=”custom” name=”custom” maxlength=”255″></td>
</tr>
<tr>
<td><label for=”custom”>Code 2:</label></td>
<td id=”_custom2″></td>
<td><input type=”text” class=”textInput” id=”custom2″ name=”custom2″ maxlength=”255″></td>
</tr>

<tr>
<td>Country:</td>
<td id=”_country”></td>
<td><select name=”country”>
<option value=”"></option>
<option value=”NO”>Norway</option>
<option value=”DK”>Denmark</option>
<option value=”SE”>Sweden</option>
<option value=”UK”>United Kingdom</option>
<option value=”US”>United States</option>
</select>
</td>
</tr>
<tr>
<td colspan=”2″><label for=”comments”>Comments:</label></td>
<td><textarea class=”textInput” name=”comments”></textarea> </td>
</tr>
<tr>
<td>Gender:</td>
<td id=”_gender”></td>
<td>
<table cellpadding=”0″ cellspacing=”0″>
<tr>
<td><input type=”radio” name=”gender” value=”F” id=”genderFemale”></td>
<td><label for=”genderFemale”> Female</label></td>
<td> <input type=”radio” name=”gender” value=”M” id=”genderMale”></td>
<td><label for=”genderMale”> Male</label></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Hobbies:<br></td>
<td id=”_hobbies[]“></td>
<td>
<input type=”checkbox” name=”hobbies[]” value=”games” id=”hobby_games”><label for=”hobby_games”>Computer games</label><br>
<input type=”checkbox” name=”hobbies[]” value=”soccer” id=”hobby_soccer”><label for=”hobby_soccer”>Soccer</label><br>
<input type=”checkbox” name=”hobbies[]” value=”stamps” id=”hobby_stamps”><label for=”hobby_stamps”>Stamps</label><br>
<input type=”checkbox” name=”hobbies[]” value=”shopping” id=”hobby_shopping”><label for=”hobby_shopping”>Shopping</label><br>
</tr>
<tr>
<td></td>
<td id=”_agree”></td>
<td><input type=”checkbox” name=”agree” id=”agree” value=”agree”> <label for=”agree”>I agree</label></td>
</tr>
<tr>
<td colspan=”2″>
</td>
<td>
<input type=”button” id=”mySubmit” class=”formButton” value=”Send” onclick=”formObj.submit()”>
<input type=”reset” class=”formButton” value=”Reset”>
</td>
</tr>
</table>
</div>
</form>
</div>

<script type=”text/javascript”>
var formObj = new DHTMLSuite.form({ formRef:’myForm’,action:’formSubmit.php’,responseEl:’formResponse’});
</script>

</body>
</html>

formSubmit.php

<?
echo “<h1>Form posted with Ajax</h1>”;
echo “<h4>POST variables</h4>”;
foreach($_POST as $key=>$value){

if(is_array($value)){
for($no=0;$no<count($value);$no++){
echo “<b>”.$key.”[$no]</b>: “.$value[$no].”<br>”;
}
}else{
echo “<b>”.$key.”</b>: “.$value.”<br>”;
}

}

echo “<h4>GET variables:</h4>”;
foreach($_GET as $key=>$value){
if(is_array($value)){
for($no=0;$no<count($value);$no++){
echo “<b>”.$key.”[$no]</b>: “.$value[$no].”<br>”;
}
}else{
echo “<b>”.$key.”</b>: “.$value.”<br>”;
}

}

?>

thumbnails images popup

<html>
<head>
<style>
body {
background-color:#000000;
color:#E27907;
font-family:Verdana,Arial;
font-size:10pt;
letter-spacing:2;
}
.thumbNormal {
border:4px solid #000000;
}
.thumbSelected {
border:4px solid #ff0000;
}
</style>
<script language=javascript>
var lastID = 0;
function SelectImg(id) {
if (lastID > 0) {
document.getElementById(lastID).className = “thumbNormal”;
}
document.getElementById(id).className = “thumbSelected”;
document.getElementById(0).src = document.getElementById(id).src;
lastID = id;
}
function LoadTrigger() {
SelectImg(1);
}
window.onload = LoadTrigger;
</script>
</head>
<body>
Click a photo on the left to view full size.
<table border=0>
<tr>
<td valign=top>
<img id=1 class=”thumbNormal” src=”http://www.codetoad.com/images/3lio103.jpg” width=120 onclick=”SelectImg(1)”>
<br><img id=2 class=”thumbNormal” src=”http://www.codetoad.com/images/3lio20.jpg” width=120 onclick=”SelectImg(2)”>
<br><img id=3 class=”thumbNormal” src=”http://www.codetoad.com/images/3lion19.jpg” width=120 onclick=”SelectImg(3)”>
</td>
<td width=15> </td>
<td valign=top>
<img id=0 src=”">
</td>
</tr>
</table>
</body>
</html>

125 code snippets

Cross Browser Multi-Page Photograph Gallery

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title> Stu Nicholls | CSSplay | Cross Browser Multi Page Photograph Gallery</title>
<meta name=”Author” content=”Stu Nicholls” />
<style type=”text/css”>

/* ================================================================
This copyright notice must be untouched at all times.

The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menu/lightbox.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any
way to fit your requirements.
=================================================================== */
/* common styling */

a {color:#000;}
a:hover {text-decoration:none;}
a:visited {color:#000;}

/* slides styling */

.photo {width:635px; text-align:left; position:relative; margin:0 auto;}

.photo ul.topic {padding:0; margin:0; list-style:none; width:635px; height:auto; position:relative; z-index:10;}

.photo ul.topic li {display:block; width:125px; height:31px; float:left;}
.photo ul.topic li a.set {display:block; font-size:11px; width:124px; height:30px; text-align:center; line-height:30px; color:#000; text-decoration:none; border:1px solid #fff; border-width:1px 1px 0 0; background:#ccc; font-family:verdana, arial, sans-serif;}

.photo ul.topic li a ul,
.photo ul.topic li ul
{display:none;}

.photo ul.topic li.active a
{color:#000; background:#bbb;}

.photo ul.topic li a:hover,
.photo ul.topic li:hover a
{color:#fff; background:#aaa;}

.photo ul.topic li.active ul
{display:block; position:absolute; left:0; top:31px; list-style:none; padding:0; margin:0; height:375px; background:#ddd; width:464px; padding:40px 60px; border:20px solid #bbb; z-index:1;}

.photo ul.topic li a:hover ul,
.photo ul.topic li:hover ul
{display:block; position:absolute; left:0; top:31px; list-style:none; padding:0; margin:0; height:375px; background:#ddd; width:464px; padding:40px 60px; border:20px solid #aaa; z-index:100;}

.photo ul.topic li ul li
{display:inline; width:112px; height:87px; float:left; border:1px solid #fff; margin:1px;}

.photo ul.topic li ul li a
{display:block; width:110px; height:85px; cursor:default; float:left; text-decoration:none; background:#444; border:1px solid #888;}

.photo ul.topic li ul li a img
{display:block; width:100px; height:75px; border:5px solid #eee;}

.photo ul.topic li a:hover ul li a:hover,
.photo ul.topic li:hover ul li a:hover
{white-space:normal; position:relative;}

.photo ul.topic li a:hover ul li a:hover img,
.photo ul.topic li:hover ul li a:hover img
{position:absolute; left:-50px; top:-32px; width:200px; height:150px; border-color:#fff;}
</style>

</head>

<body>

<div class=”photo”>
<ul class=”topic”>
<li><a class=”set” href=”#Portraits”>Portraits<!–[if gte IE 7]><!–></a><!–<![endif]–>
<!–[if lte IE 6]><table><tr><td><![endif]–>
<ul>
<li><a href=”lbox/portrait1.jpg”><img src=”http://www.cssplay.co.uk/menu/lbox/portrait1a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait2.jpg”><img src=”lbox/portrait2a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait3.jpg”><img src=”lbox/portrait3a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait4.jpg”><img src=”lbox/portrait4a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait5.jpg”><img src=”lbox/portrait5a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait6.jpg”><img src=”lbox/portrait6a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait7.jpg”><img src=”lbox/portrait7a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait8.jpg”><img src=”lbox/portrait8a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait9.jpg”><img src=”lbox/portrait9a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait10.jpg”><img src=”lbox/portrait10a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait11.jpg”><img src=”lbox/portrait11a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait12.jpg”><img src=”lbox/portrait12a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait13.jpg”><img src=”lbox/portrait13a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait14.jpg”><img src=”lbox/portrait14a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait15.jpg”><img src=”lbox/portrait15a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/portrait16.jpg”><img src=”lbox/portrait16a.jpg” alt=”" title=”" /></a></li>
</ul>
<!–[if lte IE 6]></td></tr></table></a><![endif]–>
</li>

<li class=”active”><a class=”set” href=”#Landscapes”>Landscapes<!–[if gte IE 7]><!–></a><!–<![endif]–>
<!–[if lte IE 6]><table><tr><td><![endif]–>
<ul>
<li><a href=”lbox/landscape1.jpg”><img src=”http://www.cssplay.co.uk/menu/lbox/landscape1a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape2.jpg”><img src=”lbox/landscape2a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape3.jpg”><img src=”lbox/landscape3a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape4.jpg”><img src=”lbox/landscape4a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape5.jpg”><img src=”lbox/landscape5a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape6.jpg”><img src=”lbox/landscape6a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape7.jpg”><img src=”lbox/landscape7a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape8.jpg”><img src=”lbox/landscape8a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape9.jpg”><img src=”lbox/landscape9a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape10.jpg”><img src=”lbox/landscape10a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape11.jpg”><img src=”lbox/landscape11a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape12.jpg”><img src=”lbox/landscape12a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape13.jpg”><img src=”lbox/landscape13a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape14.jpg”><img src=”lbox/landscape14a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape15.jpg”><img src=”lbox/landscape15a.jpg” alt=”" title=”" /></a></li>
<li><a href=”lbox/landscape16.jpg”><img src=”lbox/landscape16a.jpg” alt=”" title=”" /></a></li>
</ul>
<!–[if lte IE 6]></td></tr></table></a><![endif]–>
</li>
<li><a class=”set” href=”#Flowers”>Flowers<!–[if gte IE 7]><!–></a><!–<![endif]–>
<!–[if lte IE 6]><table><tr><td><![endif]–>
<ul>
<li><a href=”#flower1″><img src=”http://www.cssplay.co.uk/menu/lbox/flower1.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower2″><img src=”lbox/flower2.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower3″><img src=”lbox/flower3.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower4″><img src=”lbox/flower4.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower5″><img src=”lbox/flower5.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower6″><img src=”lbox/flower6.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower7″><img src=”lbox/flower7.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower8″><img src=”lbox/flower8.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower9″><img src=”lbox/flower9.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower10″><img src=”lbox/flower10.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower11″><img src=”lbox/flower11.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower12″><img src=”lbox/flower12.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower13″><img src=”lbox/flower13.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower14″><img src=”lbox/flower14.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower15″><img src=”lbox/flower15.jpg” alt=”" title=”" /></a></li>
<li><a href=”#flower16″><img src=”lbox/flower16.jpg” alt=”" title=”" /></a></li>
</ul>
<!–[if lte IE 6]></td></tr></table></a><![endif]–>

</li>
<li><a class=”set” href=”#Trees”>Trees<!–[if gte IE 7]><!–></a><!–<![endif]–>
<!–[if lte IE 6]><table><tr><td><![endif]–>
<ul>
<li><a href=”#tree1″><img src=”http://www.cssplay.co.uk/menu/lbox/tree1.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree2.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree3.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree4.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree5.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree6.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree7.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree8.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree9.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree10.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree11.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree12.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree13.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree14.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree15.jpg” alt=”" title=”" /></a></li>
<li><a href=”#tree1″><img src=”lbox/tree16.jpg” alt=”" title=”" /></a></li>
</ul>
<!–[if lte IE 6]></td></tr></table></a><![endif]–>
</li>
<li><a class=”set” href=”#Birds”>Birds<!–[if gte IE 7]><!–></a><!–<![endif]–>
<!–[if lte IE 6]><table><tr><td><![endif]–>

<ul>
<li><a href=”#bird1″><img src=”http://www.cssplay.co.uk/menu/lbox/bird1.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird2″><img src=”lbox/bird2.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird3″><img src=”lbox/bird3.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird4″><img src=”lbox/bird4.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird5″><img src=”lbox/bird5.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird6″><img src=”lbox/bird6.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird7″><img src=”lbox/bird7.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird8″><img src=”lbox/bird8.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird9″><img src=”lbox/bird9.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird10″><img src=”lbox/bird10.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird11″><img src=”lbox/bird11.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird12″><img src=”lbox/bird12.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird13″><img src=”lbox/bird13.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird14″><img src=”lbox/bird14.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird15″><img src=”lbox/bird15.jpg” alt=”" title=”" /></a></li>
<li><a href=”#bird16″><img src=”lbox/bird16.jpg” alt=”" title=”" /></a></li>
</ul>

<!–[if lte IE 6]></td></tr></table></a><![endif]–>
</li>
</ul>
<br class=”clear” />
</div>

</body>
</html>

code snippets links

http://www.phpwebcommerce.com/shopping-cart-source-code.php
http://www.htmlcodetutorial.com/tables/index_famsupp_30.html
http://www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php
http://psacake.com/web/jb.asp
http://homepage.ntlworld.com/kayseycarvey/jss3p9.html
http://www.mjohnston.com/2006/07/21/modrewrite-php-friendly-urls/
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
http://www.captain.at/howto-ajax-form-post-request.php
http://talkgadget.google.com/talkgadget/launch
http://articles.techrepublic.com.com/5100-22-5077713.html
http://devzone.zend.com/node/view/id/646
http://www.trans4mind.com/personal_development/JavaScript/menu1.htm
http://www.hosting.vt.edu/tutorials/phpmysql/#validation
http://forums.about.com/n/pfx/forum.aspx?tsn=1&nav=messages&webtag=ab-php&tid=287
http://www.benjaminkeen.com/software/php_validation/
http://www.daniweb.com/forums/thread54700.html
http://www.codedcode.com/
http://www.mail2web.com/
http://localhost/arcmax/joomla/administrator/index.php
http://www.cssplay.co.uk/layouts/bodyfix.html#
http://www.macridesweb.com/oltest/overflow.html
http://www.samisite.com/test-csb2nf/id43.htm
http://vikmik.multiply.com/journal/item/30/css_code_for_scrollbar_new_words-face-shadow-highlight-3dlight-darkshadow-track-arrow._Demo_on_Graaco.com
http://www.freebits.co.uk/scroll-box-using-css.html
http://apptools.com/examples/scroller.php
http://www.cssportal.com/form-elements/text-box.htm
http://www.myspace.com/benadamsuk
http://www.developertutorials.com/tutorials/php/
http://www.webmaster-tips.net/
http://www.joomlatutorials.com/
http://search.yahoo.com/
http://www.feedforall.com/more-php.htm
http://msconline.maconstate.edu/tutorials/
http://www.flzone.com/ShowDetail.asp?NewsId=4120
http://www.dynamicdrive.com/style/csslibrary/item/css_pagination_links/
http://snipplr.com/all/language/php
http://bejoor.com/info/links/index.html
http://downhomeconsulting.com/Downloads/Country_State_Drop_Down/country_state_drop_down.php
http://www.ajaxtopics.com/menu.html
http://www.e-junkie.com/ej/shopping-cart.php
http://www.google.com/webhp?complete=1&hl=en
http://www.dynamicdrive.com/dynamicindex17/ajaxpaginate/index.htm
http://en.newinstance.it/2006/09/27/client-side-html-table-pagination-with-javascript/
http://roshanbh.com.np/2008/01/populate-triple-drop-down-list-change-options-value-from-database-using-ajax-and-php.html
http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_99.html
http://www.creatingonline.com/webmaster/photo_gallery_generator.htm

add country

<?PHP
header(’Cache-Control: no-cache, no-store, must-revalidate’); //HTTP/1.1
header(’Expires: Sun, 01 Jul 2000 00:00:00 GMT’);
header(’Pragma: no-cache’); //HTTP/1.0
include “conn.php”;
ob_start();
session_start();
$submit=$_POST['Submit'];
$c_name=$_POST['countryname'];
$cn=explode(”,”,$c_name);
$countryname=$cn[1];
$countrycode=$_POST['countrycode'];
$cc=$_POST['creditcart'];
$billme=$_POST['billmelater'];
$bankt=$_POST['banktransfer'];
$check=$_POST['check'];
$payuponrecive=$_POST['payuponrecive'];
$codrate=$_POST['codrate'];
$tax=$_POST['taxrate'];
$express=$_POST['express'];
// Product Image
$ftmp = $_FILES['countryimage']['tmp_name'];
$oname = $_FILES['countryimage']['name'];
$random=mt_rand(100,500);
$oname = $random.basename($oname);
$archivedir = ‘../flagimage/’.$oname;

//product icon
/*$ftmp2 = $_FILES['icon']['tmp_name'];
$oname2 = $_FILES['icon']['name'];
$random1=mt_rand(100,500);
$oname2 = $random1.basename($oname2);

$archivedir2 = ‘../upload_producticon/’.$oname2;
*/
if ($submit ==’Continue’)
{
$_SESSION['button']=’Continue’;

$checkcountry = mysql_query(”SELECT country_name FROM countries WHERE country_name=’$countryname’”);

$country_exist = mysql_num_rows($checkcountry);

if($country_exist > 0){
$err=”I’m sorry country you specified has already been taken.  Please pick another one.”;

}
if($err==”")
{
if($oname != “” )
{
if(move_uploaded_file($ftmp,$archivedir) )
{

echo $insert=mysql_query(”insert into countries (country_name,country_code,credit_cart ,bill_me_later ,bank_transfer,pay_by_check  ,pay_upon_received,country_image,cash_on_rate ,tax_rate) values (’$countryname’,'$countrycode’,’ $cc’,'$billme’, ‘$bankt’,'$check’,'$payuponrecive’,'$oname’,'$codrate’,'$tax’)”);

}
else
{
$insert=mysql_query(”insert into countries (country_name,country_code,credit_cart ,bill_me_later ,bank_transfer ,pay_by_check ,pay_upon_received,cash_on_rate ,tax_rate) values (’$countryname’,'$countrycode’,’ $cc’,'$billme’, ‘$bankt’,'$check’,'$payuponrecive’,'$codrate’,'$tax’)”) or die(mysql_error());

}
}
}

}
//echo mysql_error();
if($insert==1)
{
header(”Location: country.php”);
}

?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<title>Add Country</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”javascript” type=”text/javascript”>
function validate()
{
if(document.frm.countryname.value== 0)
{
alert(”Please Select country Name”);
//document.frm.bname.focus();
//document.frm.countryname.value=”";
document.frm.countryname.focus();
return false;
}
if(!isNaN(document.frm.countryname.value))
{
alert(”Please enter valid country name”);
document.frm.countryname.value=”";
document.frm.countryname.focus();
return false;
}

if(document.frm.countrycode.value == 0)
{
alert(”Please Select Country Code”);
document.frm.countrycode.value=”";
document.frm.countrycode.focus();
return false;
}
if (document.frm.creditcart.checked == false &&
document.frm.billmelater.checked == false &&
document.frm.banktransfer.checked == false &&
document.frm.check.checked == false &&
document.frm.payuponrecive.checked == false) {

alert(”Please select at least one checkbox.\n”);
return false;
}

if(document.frm.countryimage.value == 0)
{
alert(”Please Select Country Image”);
document.frm.countryimage.focus();
return false;
}

if(document.frm.creditcart.value == 0)
{
alert(”Please Select  Any one payment Detail”);
document.frm.subcat.focus();
return false;
}
if(document.frm.codrate.value == “”)
{
alert(”Please Select cash on delivery”);
document.frm.codrate.value=”";
document.frm.codrate.focus();
return false;
}
if(document.frm.taxrate.value == “”)
{
alert(”Please Select taxrate”);
document.frm.taxrate.value=”";
document.frm.taxrate.focus();
return false;
}

if(document.frm.express.value == 0)
{
alert(”Please Select Shipping Express “);
document.frm.express.value=”";
document.frm.express.focus();
return false;
}
document.frm.submit();
return true;
}
function isint(s)
{
var i=0;
for(i=0; i<s.length; i++)
{
var c=s.charAt(i);
if(((c <”0″) || (c > “9″))) return false;
}
return true;
}

function get_country_code()
{
var ccode = document.frm.countryname.value;
//alert(ccode);
document.frm.countrycode.value=ccode.substring(0,2);
}

</script>
</head>
<link rel=”stylesheet” href=”style.css” type=”text/css”>
<body>
<form name=”frm” method=”post” enctype=”multipart/form-data” action=”" onSubmit=”return validate();”>
<table border=”0″  bgcolor=”#990000″ align=”center” width=”100%” height=”575″ cellpadding=”3″ cellspacing=”1″>
<tr bgcolor=”#FFFFFF”>
<td height=”40″ align=”center” class=”style3″><?php include “leftmenu.php”; ?></td>
</tr>
<tr bgcolor=”#FFFFFF”>
<td>

<p>&nbsp;</p>
<table width=”55%” align=”center” cellpadding=”2″ cellspacing=”2″ border=”0″>

<tr bgcolor=”#FFFFFF” height=”50″>
<td height=”35″ colspan=”2″ align=”center” class=”style4″><font color=”red”><?php echo $err;?> </font></td>
</tr>
<tr bgcolor=”#CCCCCC” height=”50″>
<td height=”35″ colspan=”2″ align=”center” class=”style4″><span style=”font:”Times New Roman”" ><b>Countries And Payment Detail</b></span></td>
</tr>

<!– OLD CountryName and Code Row
<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Enter Country Name:</td>
<td width=”50%”>&nbsp;
<input type=”text” name=”countryname”></td>
</tr>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Enter Country Code:</td>
<td width=”50%”>&nbsp;
<input type=”text” name=”countrycode”></td>
</tr>
–>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Select Country Name:</td>
<td width=”50%”>&nbsp;
<select name=”countryname” onChange=”get_country_code();”>
<option value=”0″>Select Country</option>
<?php
$co_sql=”SELECT c_name, c_code FROM country_name order by c_name”;
$co_result=mysql_query($co_sql);
while($co_row=mysql_fetch_array($co_result))
{
?>
<option value=”<?php echo $co_row['c_code'].”,”.$co_row['c_name']; ?>”><?php echo $co_row['c_name']; ?></option>
<?php
}
?>
</select>
</td>
</tr>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Country Code:</td>
<td width=”50%”>&nbsp;
<input type=”text” name=”countrycode” value=”Select Country” readonly=”readonly”></td>
</tr>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Payment Select :</td>
<td width=”50%”>&nbsp;<input type=”checkbox” name=”creditcart” value=’1′ >&nbsp;Creditcart
<input type=”checkbox” name=”billmelater” value=’1′  >&nbsp;Bill Me Later
<input type=”checkbox” name=”banktransfer” value=’1′  >&nbsp;Bank Transfer
<input type=”checkbox” name=”check” value=’1′ >&nbsp;Check
<input type=”checkbox” name=”payuponrecive” value=’1′  > &nbsp;Pay Upon Receive</td>
</tr>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Enter Country Flag image:</td>
<td width=”50%”>&nbsp;
<input type=”file” name=”countryimage”></td>
</tr>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Enter Cash On Delivery Rate:</td>
<td width=”50%”>&nbsp;
<input type=”text” name=”codrate”></td>
</tr>

<tr bgcolor=”#DDDDDD” height=”25″ class=”style1″>
<td width=”50%” align=”right”>Enter Tax Rate:</td>
<td width=”50%”>&nbsp;
<input type=”text” name=”taxrate”></td>
</tr>

<!–  <tr bgcolor=”#DDDDDD” height=”40″ class=”style1″>
<td align=”right”>Enter Shipping Express </td>
<td align=”left”><label>
<input name=”express” type=”text” id=”express”>
</label></td>
<tr bgcolor=”#DDDDDD” height=”40″ class=”style1″>–>
<td colspan=”2″ align=”center”><input name=”Submit” type=”submit” value=”Continue”></td>
</table>
<p>&nbsp;</p></td>
</tr>
</table>

</form>
</body>
</html>

add category

<?php
header(’Cache-Control: no-cache, no-store, must-revalidate’); //HTTP/1.1
header(’Expires: Sun, 01 Jul 2000 00:00:00 GMT’);
header(’Pragma: no-cache’); //HTTP/1.0
include ‘conn.php’;
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html><head>
<title>Add User</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”javascript” type=”text/javascript”>
function validate()
{
if(document.frm.clothing.value==0)
{
alert(”Select the Brand Name”);
document.frm.clothing.focus();
return false;
}
if(document.frm.categoryname.value==”")
{
alert(”Please Enter The Category Name”);
document.frm.categoryname.focus();
return false;
}
if(document.frm.content.value==”")
{
alert(”Please Enter The Content details”);
document.frm.content.focus();
return false;
}
if(document.frm.image.value==”")
{
alert(”Please Select The Category Image”);
document.frm.image.focus();
return false;
}
document.frm.submit();
return true;
}
</script>
<link rel=”stylesheet” href=”style.css” type=”text/css”>
</head>
<body>
<table border=”0″  bgcolor=”#990000″ align=”center” width=”100%” height=”585″ cellpadding=”3″ cellspacing=”1″>
<tr bgcolor=”#FFFFFF”>
<td height=”40″ align=”center” bgcolor=”#F4F4F4″><div class=”style3″><?php include “leftmenu.php”; ?></div></td>
</tr>
<tr bgcolor=”#FFFFFF”>
<td>
<form name=”frm” method=”post” action=”add_category1.php” enctype=”multipart/form-data” onSubmit=”return validate();”>
<p>&nbsp;</p>
<table width=”65%” align=”center” cellpadding=”2″ cellspacing=”2″ border=”0″>
<tr bgcolor=”#DDDDDD” height=”50″>
<td height=”35″ colspan=”2″ align=”center” bgcolor=”#CCCCCC”><div class=”style4″>ADD CATEGORY</div></td>
</tr>

<tr bgcolor=”#DDDDDD” height=”40″>
<td width=”50%” align=”right”><div class=”style1″>Brand Name:</div></td>

<td width=”50%”>&nbsp;
<select name=”clothing” id=”clothing”>
<option  value=”0″ selected>–Select–</option>
<?
$sql=”select * from clothing”;
$result=mysql_query($sql);
$numrows=mysql_num_rows($result);
while($row=mysql_fetch_array($result))
{
?>
<option value=”<?php echo $row['cloth_id'];?>”><?php echo $row['brand_name']; ?></option>
<?php
}
?>
</select>

</td>
</tr>
<tr bgcolor=”#DDDDDD” height=”40″>
<td width=”50%” align=”right”><div class=”style1″>Select Language :</div></td>
<td width=”50%”> <select name=”language” id=”language”>
<option  value=”0″ selected>–Select–</option>
<?
$sqll=”select * from languages”;
$resultl=mysql_query($sqll);
$numrowsl=mysql_num_rows($resultl);
while($rowl=mysql_fetch_array($resultl))
{
?>
<option value=”<?php echo $rowl['languages_id'];?>”><?php echo $rowl['name']; ?></option>
<?php
}
?>
</select>    </td></tr>

<tr bgcolor=”#DDDDDD” height=”40″>
<td width=”50%” align=”right”><div class=”style1″>Enter Category:</div></td>
<td width=”50%”>&nbsp;
<input type=”text” name=”categoryname”></td>
</tr>
<tr bgcolor=”#DDDDDD” height=”40″>
<td width=”50%” align=”right”><div class=”style1″>Category Content:</div></td>
<td width=”50%”>&nbsp;
<textarea name=”content”></textarea></td>
</tr>
<tr bgcolor=”#DDDDDD” height=”40″>
<td width=”50%” align=”right”><div class=”style1″>Category Image:</div></td>
<td width=”50%”>&nbsp;
<input type=”file” name=”image”></td>
</tr>

<tr bgcolor=”#DDDDDD” height=”50″>
<td align=”right”><input type=”submit” value=”Save”></td>
<td>&nbsp;
<input type=”reset” value=”Cancel” onClick=”javascript:location.href=’category.php’”></td>
</tr>

</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>

</body>
</html>

textarea borderless css

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Untitled Document</title>
<style type=”text/css”>
textarea.General{
border:0px;
}
textarea.General{
font-family: verdana;
font-size: 13px;
color: skyblue;
border:0px;
text-align:justify;
border-style: solid; ‘or dashed or dotted’
border-color: #FFF;
background-color: #FFFFFF; ‘any Hex value or transparent is you desire’
}

</style>
<style type=”text/css”>
BODY { scrollbar-face-color: #ffffff; scrollbar-shadow-color: #ffffff; scrollbar-highlight-color: #ffffff; scrollbar-3dlight-color: #ffffff; scrollbar-darkshadow-color: #ffffff; scrollbar-track-color: #ffffff; scrollbar-arrow-color: red; }
</STYLE>

</head>
<body>
<form id=”form1″ name=”form1″ method=”post” action=”">
<label>
<div align=”center”>
<textarea  class=”General” name=”textarea” cols=”55″ rows=”10″>
The contents of the pages shown in the window wrap to fit the window.They are cross-browser compatible.  (Netscape 4x doesn’t support,later versions and Mozilla Firebird do!)You can set either type to blend into your page or have a beveled edge border.The iframe can be bordered or made a different color so it stands out from the pageThe iframe can be borderlesss to blend into the page.  Use a matching the color to become nvisible to the eyes.Easy to update/change the link or content.Many iFrames can be placed on the same page.   (There are five on this page)  Use links in one iFrame to change another.  Useful for samples, images, product descriptions.You can float an iframe over the page contents to create interesting designs.  (Frame 5)purple arrow purple arrowYou can change 2 iFrames with a single link!A simple additional code allows a link to change two iFrames at the same time! Click SPECIAL TARGET LINK  for practical demonstration and iframe code tutorial.purple arrow purple arrowYou can make a transparent iframe - see the page background through it.2 additional code snippets allow the original page background to be visible under the iframe.Click HERE for a practical demonsration and iframe code tutorial.purple arrow purple arrowYou can make an iframe photo gallery - 2 ways this can be done!Place a static iframe on your display page and make a content page for each link. See the link Practical Uses for a sample.  Follow standard instructions for static iframe.Second variation only uses ONE web page.  Links are made to the large images that appear within the iframe box, with no need for the additional code snippets allow the original page background to be visible under the iframe. Instructions and sample here:  Display Gallery of PhotoThe contents of the pages shown in the window wrap to fit the window.They are cross-browser compatible.  (Netscape 4x doesn’t support, but later versions and Mozilla Firebird do!)You can set either type to blend into your page or have a beveled edge border.The iframe can be bordered or made a different color so it stands out from the pageThe iframe can be borderlesss to blend into the page.  Use a matching the color to become nvisible to the eyes.Easy to update/change the link or content.Many iFrames can be placed on the same page.   (There are five on this page)  Use links in one iFrame to change another.  Useful for samples, images, product descriptions.You can float an iframe over the page contents to create interesting designs.  (Frame 5)purple arrow purple arrowYou can change 2 iFrames with a single link!A simple additional code allows a link to change two iFrames at the same time! Click SPECIAL TARGET LINK  for practical demonstration and iframe code tutorial.
</textarea>
</div>
</label>
</form>
</body>
</html>

fileupload filename upload status description

<?php
//$upload_dir = “/var/www/anyexample/aeu”; // Directory for file storing
// filesystem path

//$web_upload_dir = “/aeu”; // Directory for file storing
// Web-Server dir

/* upload_dir is filesystem path, something like
/var/www/htdocs/files/upload or c:/www/files/upload

web upload dir, is the webserver path of the same
directory. If your upload-directory accessible under
www.your-domain.com/files/upload/, then
web_upload_dir is /files/upload
*/

// testing upload dir
// remove these lines if you’re shure
// that your upload dir is really writable to PHP scripts
$tf = $upload_dir.’/’.md5(rand()).”.test”;
$f = @fopen($tf, “w”);
if ($f == false)
die(”Fatal error! {$upload_dir} is not writable. Set ‘chmod 777 {$upload_dir}’
or something like this”);
fclose($f);
unlink($tf);
// end up upload dir testing

// FILEFRAME section of the script
if (isset($_POST['fileframe']))
{
$result = ‘ERROR’;
$result_msg = ‘No FILE field found’;

if (isset($_FILES['file']))  // file was send from browser
{
if ($_FILES['file']['error'] == UPLOAD_ERR_OK)  // no error
{
$filename = $_FILES['file']['name']; // file name
move_uploaded_file($_FILES['file']['tmp_name'], $upload_dir.’/’.$filename);
// main action — move uploaded file to $upload_dir
$result = ‘OK’;
}
elseif ($_FILES['file']['error'] == UPLOAD_ERR_INI_SIZE)
$result_msg = ‘The uploaded file exceeds the upload_max_filesize directive in php.ini’;
else
$result_msg = ‘Unknown error’;

// you may add more error checking
// see http://www.php.net/manual/en/features.file-upload.errors.php
// for details
}

// outputing trivial html with javascript code
// (return data to document)

// This is a PHP code outputing Javascript code.
// Do not be so confused ;)
echo ‘<html><head><title>-</title></head><body>’;
echo ‘<script language=”JavaScript” type=”text/javascript”>’.”\n”;
echo ‘var parDoc = window.parent.document;’;
// this code is outputted to IFRAME (embedded frame)
// main page is a ‘parent’

if ($result == ‘OK’)
{
// Simply updating status of fields and submit button
echo ‘parDoc.getElementById(”upload_status”).value = “file successfully uploaded”;’;
echo ‘parDoc.getElementById(”filename”).value = “‘.$filename.’”;’;
echo ‘parDoc.getElementById(”filenamei”).value = “‘.$filename.’”;’;
echo ‘parDoc.getElementById(”upload_button”).disabled = false;’;
}
else
{
echo ‘parDoc.getElementById(”upload_status”).value = “ERROR: ‘.$result_msg.’”;’;
}

echo “\n”.’</script></body></html>’;

exit(); // do not go futher
}
// FILEFRAME section END

// just userful functions
// which ‘quotes’ all HTML-tags and special symbols
// from user input
function safehtml($s)
{
$s=str_replace(”&”, “&amp;”, $s);
$s=str_replace(”<”, “&lt;”, $s);
$s=str_replace(”>”, “&gt;”, $s);
$s=str_replace(”‘”, “&apos;”, $s);
$s=str_replace(”\”", “&quot;”, $s);
return $s;
}

if (isset($_POST['description']))
{
$filename = $_POST['filename'];
$size = filesize($upload_dir.’/’.$filename);
$date = date(’r', filemtime($upload_dir.’/’.$filename));
$description = safehtml($_POST['description']);

// Let’s generate file information page
$html =<<<END
<html><head><title>{$filename} [uploaded by IFRAME Async file uploader]</title></head>
<body>
<h1>{$filename}</h1>
<p>This is a file information page for your uploaded file. Bookmark it, or send to anyone…</p>
<p>Date: {$date}</p>
<p>Size: {$size} bytes</p>
<p>Description:
<pre>{$description}</pre>
</p>
<p><a href=”{$web_upload_dir}/{$filename}” style=”font-size: large;”>download file</a><br>
<a href=”{$PHP_SELF}” style=”font-size: small;”>back to file uploading</a><br>
<a href=”{$web_upload_dir}/upload-log.html” style=”font-size: small;”>upload-log</a></p>
<br><br>Example by <a href=”http://www.anyexample.com/”>AnyExample</a>
</body></html>
END;
// save HTML
$f = fopen($upload_dir.’/’.$filename.’-desc.html’, “w”);
fwrite($f, $html);
fclose($f);
$msg = “File {$filename} uploaded,
<a href=’{$web_upload_dir}/{$filename}-desc.html’>see file information page</a>”;

// Save to file upload-log
$f = fopen($upload_dir.”/upload-log.html”, “a”);
fwrite($f, “<p>$msg</p>\n”);
fclose($f);

// setting result message to cookie
setcookie(’msg’, $msg);
// redirecting to the script main page
// we’re doing so, to avoid POST form reposting
// this method of outputting messages is called ‘flash’ in Ruby on Rails
header(”Location: http://”.$_SERVER['HTTP_HOST'].$PHP_SELF);
exit();
// redirect was send, so we’re exiting now
}

// retrieving message from cookie
if (isset($_COOKIE['msg']) && $_COOKIE['msg'] != ”)
{
if (get_magic_quotes_gpc())
$msg = stripslashes($_COOKIE['msg']);
else
$msg = $_COOKIE['msg'];

// clearing cookie, we’re not going to display same message several times
setcookie(’msg’, ”);
}
?>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<!– Beginning of main page –>
<html><head>
<title>IFRAME Async file uploader example</title>
</head>
<body>
<?php
if (isset($msg)) // this is special section for outputing message
echo ‘<p style=”font-weight: bold;”>’.$msg.’</p>’;
?>
<h1>Upload file:</h1>

<form action=”<?=$PHP_SELF?>” target=”upload_iframe” method=”post” enctype=”multipart/form-data”>
<input type=”hidden” name=”fileframe” value=”true”>
<!– Target of the form is set to hidden iframe –>
<!– From will send its post data to fileframe section of
this PHP script (see above) –>

<label for=”file”>text file uploader:</label><br>
<!– JavaScript is called by OnChange attribute –>
<input type=”file” name=”file” id=”file” onChange=”jsUpload(this)”>
</form>
<script type=”text/javascript”>
/* This function is called when user selects file in file dialog */
function jsUpload(upload_field)
{
// this is just an example of checking file extensions
// if you do not need extension checking, remove
// everything down to line
// upload_field.form.submit();

var re_text = /\.txt|\.xml|\.zip/i;
var filename = upload_field.value;

/* Checking file type */
if (filename.search(re_text) == -1)
{
alert(”File does not have text(txt, xml, zip) extension”);
upload_field.form.reset();
return false;
}

upload_field.form.submit();
document.getElementById(’upload_status’).value = “uploading file…”;
upload_field.disabled = true;
return true;
}
</script>
<iframe name=”upload_iframe” style=”width: 400px; height: 100px; display: none;”>
</iframe>
<!– For debugging purposes, it’s often useful to remove
“display: none” from style=”" attribute –>
<br>Upload status:<br>
<input type=”text” name=”upload_status” id=”upload_status”
value=”not uploaded” size=”64″ disabled>
<br><br>

File name:<br>
<input type=”text” name=”filenamei” id=”filenamei” value=”none” disabled>

<form action=”<?=$PHP_SELF?>” method=”POST”>
<!– one field is “disabled” for displaying-only. Other, hidden one is for
sending data –>
<input type=”hidden” name=”filename” id=”filename”>
<br><br>

<label for=”photo”>File description:</label><br>
<textarea rows=”5″ cols=”50″ name=”description”></textarea>

<br><br>
<input type=”submit” id=”upload_button” value=”save file” disabled>
</form>
<br><br>
<a href=”<?=$web_upload_dir?>/upload-log.html”>upload-log</a>
<br><br><br>
Example by <a href=”http://www.anyexample.com/”>AnyExample</a>
</body>
</html>

currentdate in wordpress

<?php
$curDate = date(’D., F jS Y H:i:s’);

echo “\n

“;
echo ‘Right now the server thinks it is ‘ . $curDate;
echo “\n

“;
?>

« Previous entries