.
Zabardast dost sharing k liye shukriya
i have attache the form.html for layout code of this class
//app.php code for this file
<?php
function cleanStr($str)
{
$cStr=trim($str);
$cStr=htmlspecialchars($cStr);
$cStr=addslashes($cStr);
return $cStr;
}
function emptyFields($ar)
{
if(!is_array($ar))
{
print "The argument must be an Array";
return false;
}
foreach($ar as $key => $value){
if(empty($value))
{
print "<b>".ucwords($key)."</b> Must not be empty.please click the browser
back button and correct it";
return false;
}
}
return true;
}
if(!emptyFields($_POST)){
exit();
}
function isEligible($skills,$age){
$age=intval($age);
if(count($skills)==0){
print ("you donot have any skill");
return false;
}
if($age<23 ||$age>35){
print ("your age must be between 23 and 35");
return false;
}
return true;
}
$name=cleanStr($_POST['name']);
$phone=cleanStr($_POST['phone']);
$email=cleanStr($_POST['email']);
$address=cleanStr($_POST['address']);
$gender=$_POST['gender'];
$city=$_POST['city'];
$age=(int)cleanStr($_POST['age']);
$skills=$_POST['skills'];
if(!isEligible($skills,$age)){
exit();
}
print "<h4>Thank you ".$name." for your interset in this job.we will contact you soon.</h4>";
print "We have recived following Information about you.<br/>";
print "Name : ".$name."<br/>";
print "Phone : ".$phone."<br/>";
print "Email : ".$email."<br/>";
print "Address : ".$address."<br/>";
print "Gender : ".$gender."<br/>";
print "City : ".$city."<br/>";
print "Age : ".$age."<br/>";
print "your skills : ";
foreach($skills as $value){
print $value.",";
}
?>
excellent ..
good luck nice sharing.
Salam to all friends.
My email addresses:-
Thanks alot Shakeel bhaie....
Allah de Khushaala Sata Amin...
Workshop k Answer koshesh karoonga k jald Post karsakoon...
Late is lie hojata hai k time aur Light dono k Qellat hai...
Death is not the biggest Loss in life.
The biggest loss is when relationships die among us when we are alive!! (Shakespeare)
nice teacher jeeeeeeeee
Thanks for nice sharing
sub ka buhat buhat shukarya.
In rain all birds occupy shelter, but Eagle is the only 1 that avoids rain by flying above the clouds.
Bookmarks