-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalid.php
More file actions
60 lines (50 loc) · 1.34 KB
/
valid.php
File metadata and controls
60 lines (50 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
$FirstName = $_POST['txtFName'];
$LastName = $_POST['txtLName'];
$DOB = $_POST['Date'];
$Email = $_POST['Email'];
$MobileNo = $_POST['mobileNo'];
$Gender = $_POST['Gender'];
$Address = $_POST['address'];
$City = $_POST['city'];
$PINCode = $_POST['pincode'];
$State = $_POST['state'];
$Country = $_POST['selCountry'];
$Hobbies = "";
if(isset($_POST['playing']))
{
$Hobbies=$_POST['playing'];
}
if(isset($_POST['traveling']))
{
$Hobbies=$Hobbies.", ".$_POST['traveling'];
}
if(isset($_POST['dancing']))
{
$Hobbies=$Hobbies.", ".$_POST['dancing'];
}
if(isset($_POST['other']))
{
$Hobbies=$Hobbies.", ".$_POST['other'];
}
$Coures = $_POST['coures'];
if(empty($FirstName)){
echo "First Name Can't be empty";
}
elseif(!ereg('^[a-z]|[A-Z]',$FirstName)){
echo "Name must be in Character";
}
echo "firstname: $FirstName"."<br>";
echo "lastname: $LastName"."<br>";
echo "date of birth: $DOB"."<br>";
echo "Email: $Email"."<br>";
echo "Mobile No: $MobileNo"."<br>";
echo "Gender: $Gender"."<br>";
echo "Address is: $Address"."<br>";
echo "City: $City"."<br>";
echo "PINCode: $PINCode"."<br>";
echo "State: $State"."<br>";
echo "Country: $Country"."<br>";
echo "Hobbies: $Hobbies"."<br>";
echo "Coures: $Coures"."<br>";
?>