New Hosting

ads auto

Monday, June 28, 2010

PHP How to retun multi record

Easiest in the world PHP command get PHP how to return multi-record or multi-variable.

Saturday, June 26, 2010

How to check SQL script PHP code error

How to check SQL script PHP code error, which we able to use echo to do this advantage.
instance:
echo $sql;

Tuesday, June 22, 2010

PHP database list box

PHP code how to create list box from database value







Sunday, June 20, 2010

Free Build new form or Template

Best free template builder here
http://www.phpform.org/

Limitation of header clause in PHP

Example:
...
if(a=b)
{
...
}
else
{
...
header("Location: admin_home.php");
}
?>

header need located at last clause of php code:
must not have space and other command

Saturday, June 19, 2010

php where Clause

Pattern:
SELECT column_name(s)
FROM table_name
WHERE column_name operator value

PHP code Example:
$myquery= mysql_query("SELECT * FROM Persons
WHERE FirstName='John' ");

$result=mysql_query($myquery);
if(!$result)
{
$error = "Query fail!";
return($error);
}

Where Clause with variable
$myquery ="select * from userdb where user = '".$myuser."' and usepw= '".$mepw."' ";

this clause specific 2 variables those are:

$myuser => ' " .$myuser. " '

$mepw => ' " .$mepw. " '

Please Note: ' " .$myuser. " ' => must no space => should be '".$myuser."'

PHP Correct Web Date time

PHP code fix problem regarding time not correct
$metime = date("Y-m-d H:i:s", strtotime("+5 hours"));

PHP Check Server Time Zone
echo date_default_timezone_get();;

Domain