JDev

Code, cssJune 12, 2006 12:17 pm

The post moved to http://www.ekcsoft.com/jstl/content/form_layout

 

 

Code, phpJune 9, 2006 2:14 pm

The  $_REQUEST predefined variable is an array consisting of the contents of $_GET, $_POST, and $_COOKIE.

To enumerate through each value in this array use the following:

   foreach($_REQUEST as $key => $value) {
           echo "key: $key value: $value<br>";
    }

 PHP Books on Amazon.com

phpJune 8, 2006 2:30 am

   
   $file  = basename($_SERVER[’PHP_SELF’]);

Will return the file name with extension;

There is a way to get the file name without extension too:

http://ca3.php.net/manual/en/function.basename.php

 

mysqlJune 7, 2006 1:05 pm

    Here is how I use the MySql date field.

I created a field of date type in the existing table as follows:

ALTER TABLE tableName ADD COLUMN crdate DATE;

The current date is inserted using the now() function: 

 INSERT INTO tableName (field1, crdate) VALUES (’value1′, NOW())

Then, the rows with the current date are selected using the curdate() function:

SELECT * FROM tableName WHERE crdate = CURDATE();