Adminer

blogroll, mysql, php No Comments »

Adminer

Adminer (formerly phpMinAdmin) is a full-featured MySQL management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server

WinBinder

blogroll, php No Comments »

WinbinderWinBinder is a new open source extension for PHP, the script programming language. It allows PHP programmers to easily build native Windows applications.

Get visitors IP

php No Comments »
    $ip = $_SERVER['REMOTE_ADDR'];

mysql_insert_id

blogroll, mysql, php No Comments »
       mysql_insert_id()

http://php.net/manual/en/function.mysql-insert-id.php

mysql_affected_rows

blogroll, mysql, php No Comments »
       mysql_affected_rows()

http://php.net/manual/en/function.mysql-affected-rows.php

ternary operators

php No Comments »
<?
   echo ($a == 0 ? "zero" : "not zero");
?>

http://php.net/ternary

Variable Variables in php

php No Comments »
<?php
 $PK = "PrimaryID";
 $$PK = "100034";
 echo $PrimaryID; // 100034
 echo $$PK;             // 100034
?>

Defining Constants in PHP

php No Comments »
<?
  define("VERSION", 2);
  echo "Current version is " . VERSION;
?>

$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";
      }
?>

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in