Friday, October 30, 2009
Thursday, October 29, 2009
Email validation script in Php
There is simple code to validate email in php
Php code //
If(trim($_REQUEST("email"])=="")
$Em="Email id cannot be empty";
$errFlag="true";
}
else
{
if(!ereg("^(.+)@(.+)\\.(.+)$",trim($_Post("email"])))
{
$Em="Invalid Email Id";
$errFlag="true";
}
}
Html code //
Email " size="40" maxlength="40">
Php code //
If(trim($_REQUEST("email"])=="")
$Em="Email id cannot be empty";
$errFlag="true";
}
else
{
if(!ereg("^(.+)@(.+)\\.(.+)$",trim($_Post("email"])))
{
$Em="Invalid Email Id";
$errFlag="true";
}
}
Html code //
Email " size="40" maxlength="40">
Automatic Download script in Php
Some website has functionality .... when we open the web site automatic some file downloading will start
here i m write simple Php script to start automatic download when page is loaded .......
header ('Content-type:application/doc');
// Doc is your document type u can change it
header ('Content-Disposition:attachement;filename="xyz.doc")
// xyz..doc is your document ready to download
exit();
?>
Tuesday, October 27, 2009
Monday, October 26, 2009
Background effect in webpage ( Blink the background color )
Copy and past .... this code where .. u .. want..
Subscribe to:
Posts (Atom)