function is_valid_url(url)
{
return url.match(/^(ht|f)tps?:\/\/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\\|\\\^\[\]`]+)?$/);
}
Javascript validation for URL
Getting checkbox values in POST (PHP)
<html>
<head>
<title>checkbox help</title>
</head>
<?
if (isset($HTTP_POST_VARS)) {
$fruit = $HTTP_POST_VARS["fruit"];
echo("Fruits chosen: " . count($fruit) . "<br><br>");
if (count($fruit)>0) {
echo("You chose the following fruits:<br>");
}
for ($i=0; $i<count($fruit); $i++) {
echo( ($i+1) . ") " . $fruit[$i] . "<br>");
}
}
?>
<body bgcolor="#ffffff">
<form method="post">
Choose a fruit:<br><br>
<input type="checkbox" name="fruit[]" value="apples">apples <br>
<input type="checkbox" name="fruit[]" value="oranges">oranges <br>
<input type="checkbox" name="fruit[]" value="peaches">peaches <br>
<input type="checkbox" name="fruit[]" value="mangos">mangos<br>
<input type="submit">
</form>
</body>
<html>
Email format validation in Php using regular expressions
never ever include filename which you are including in htaccess url
example: RewriteRule ^admin/profile /admin.php?file=profile [NC]
in this first name after “domainname or ^ ” and filename you are using for reference is same
“ ^admin/” = “/admin.php?file=profile”
so give another name for filename reference.
like this RewriteRule ^admin/profile /master.php?file=profile [NC]
it worked.
.htaccess handling at godaddy hosting or any hosting. Tips to remember
never ever include filename which you are including in htaccess url
example: RewriteRule ^admin/profile /admin.php?file=profile [NC]
in this first name after “domainname or ^ ” and filename you are using for reference is same
“ ^admin/” = “/admin.php?file=profile”
so give another name for filename reference.
like this RewriteRule ^admin/profile /master.php?file=profile [NC]
it worked.
Redirect from BlogSpot to website
<meta HTTP-EQUIV="REFRESH" content="0; url=http://bradsblog.net/">