$PHP_AUTH_PW, $PHP_AUTH_USER

html, php No Comments »
<?
$USERNAME="user";
$PASSWORD="test";

if ($PHP_AUTH_PW!=$PASSWORD || $PHP_AUTH_USER!=$USERNAME){
        header('WWW-Authenticate: Basic realm="secure content"');
        header('HTTP/1.0 401 Unauthorized');
        echo "Unauthorized";
        exit;
}
?>

simple page config

php No Comments »
<?
   switch ($id) {
    case "1":
      $caption = "Caption 1";
      $content = "Content 1";
    break;

    case "2":
      $caption = "Caption 2";
      $content = "Content 2";
    break;          
         
    default:
      $caption = "Default caption";
      $content = "Default content";
      }
?>

Amount in words (in Latvian) – pascal

pascal No Comments »

Read the rest of this entry »

simple search highlite

php No Comments »

Read the rest of this entry »

Amount in words (in Latvian) – php

php 1 Comment »

Read the rest of this entry »

Lightbox2

ajax, blogroll No Comments »

http://www.huddletogether.com/projects/lightbox2

GreyBox – A pop-up window that doesn’t suck.

ajax, blogroll No Comments »

http://orangoo.com/labs/GreyBox/

every second record

php No Comments »
<?
 $i=0;
 while ($i <= 10){
   $i++;
   if($i%2==0){ echo $i."=second<br>"; };
 }
?>

get week day

php No Comments »
<?
$date=date("Y-m-d");

function getweekday($date){
  $pieces = explode("-", $date);
  $tstamp=mktime(0,0,0,$pieces[1],$pieces[2],$pieces[0]);
  $Tdate = getdate($tstamp);
  $wday=$Tdate["wday"];
  return $wday;
}
?>

simple mysql while

mysql, php No Comments »
<?
 $query = mysql_query("SELECT name FROM Table");
 while ($item = mysql_fetch_object($query)) {
    echo $item->name;
    echo "<br>";
 }
?>
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in