nice well
nice well
Zabardast dost sharing k liye shukriya
nice bro i m very thankful to you
really very informative sharing... thank you so much shakeel bhai.........
wow what a sharing it is.
Very nice sir, I like it...
Zabardast, cha gaye hain bhai
Ans of Q.2 & and shakeel bhai ap ke lye jitney duaye of utni kam hai ab buhut umda sikha rahey hai Allah pak ap ko kamyab karey(Ameen)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="niceabi" />
<title>Workshop of Q2</title>
</head>
<body>
<?php
$date=trim($_POST['date']);
if($_POST['post']){
if(preg_match('/^([0-2][1-9]|3[0-1])-(0[1-9]|1[0-2])-([1-2][0-9]{3})$/',$date)){
print "Your Date Format is Valid";
}else{
Print "Your Date Format is Invalid";
}
}
?>
<form method="post" action="Q2.php">
<table width="60%" border="1">
<tr><td>Put Your Date</td><td><input type="text" name="date"></td><td>(15-07-1984)(dd-mm-Year)</td></tr>
<input type="hidden" value="true" name="post">
<tr><td> </td><td><input type="submit" value="submit" name="submit"></td><td> </td></tr>
</table>
</form>
</body>
</html>
answer of Q.2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="niceabi" />
<title>Workshop Q.2</title>
</head>
<?php
//creating function to escap whitespace and special characters
function cleanStr($str){
$cstr=trim($str);
$cstr=htmlspecialchars($cstr);
$cstr=addslashes($cstr);
return $cstr;
}
//Gettign value of text box and puting the function
$txt=cleanStr($_POST['bb']);
if($_POST[post]){
//Making the patren in array
$patren=array(
"/\[b\](.*?)\[\/b\]/is",
"/\[i\](.*?)\[\/i\]/is",
"/\[u\](.*?)\[\/u\]/is",
);
//making the replace patren in array
$replace=array(
"<b>$1</b>",
"<i>$1</i>",
"<u>$1</u>",
);
//getting the value of BBcode only [b][i][u]
if(
$txt=preg_replace($patren,$replace,$txt)){
Print $txt;
}else{
print "Put The BB Code valid patren";
}
}
?>
<body>
<form method="post" action="Q3.php">
Enter the Text With BB Code:<br />
<textarea name="bb"></textarea>
<input type="hidden" name="post" value="true"><br />
<input type="submit" value="submit" name="submit">
</form>
</body>
</html>
Happy new year 2012
Bookmarks