0% found this document useful (0 votes)
28 views

Web Programming Assignment-4

Uploaded by

kustudent068
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Web Programming Assignment-4

Uploaded by

kustudent068
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Student Registration Website Development

<!DOCTYPE html>
<html>
<head>
<title>Login Form</title>
</head>
<body>
<h2>Login Form</h2>
<form action="login.php" method="post">
<div>
<label for="username">Username: </label>
<input type="text" id="username" name="username" required>
</div>
<div>
<label for="password">Password: </label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">Login</button>
</form>
</body>
<?php
$con = mysqli_connect("Localhost", "root" , "","Login");
if(!$con) {
die("Connection failed: " .mysql_connect_error() );
}

$username = $_PSOT['name'];
$password = $POST['password'];

$query = "SELECT * FROM Login WHERE username = '$userame' AND


password='$password'";

$result = mysqli_query($con , $query);


if(mysqli_num_rows($result) == 1) {
// 1 mean TRUE
echo "Login successful";
} else {
echo "Login failed: Invalid user or password";
}

mysql_close($con);
?>
<body>
<h2>Login Form</h2>
<form action="login.php" method="post">
<div>
<label for="userame"Username: </label>
<input type="text" id="userame" name="text1" required>
<!--name username will be use in mysql as an attribute
This use to intreact -->
</div>

<div>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">Login</button>
</form>

<!--Registration Page -->


<h1> Registration </h1>
<form action='' method ='post'>

<label> Name: </label>


<input type="text" name='name' > <br>

<label> Surname: </label>


<input type="text" name='surname' > <br>

<label> Age: </label>


<input type="number" name='age' > <br>

<label> Email: </label>


<input type="email" name='email' > <br>

<label> Program of Study: </label>


<select name='program'>
<option> Information Technology </option>
<option> Business</option>
<option> Banking and Finance</option>
<option> Other </option>
</select> <br>

<label> Gender: </label> <br>


<input type='radio' id ='female' name ='gender'> Female <br>
<input type='radio' id='male' name ='gender'> Male <br>

<label> Date of Birth: </label>


<input type="date" name="date"> <br>

<label> Nationality: </label>


<input type="text" name="nationality"><br>

<label> Mobile Number </label>


<input type="number" name="number"><br>

<label> City </label>


<input type="text" name="city"><br>

<label> State/Province/Region: </label>


<input type="text" name="region"><br>

<label> Postal Code </label>


<input type="text" name="postcode"><br>

<label> Country: </label>


<select name='country'>
<option value="Afghanistan">Afghanistan</option>
<option value="Australia">Australia</option>
<option value="Bahrain">Bahrain</option>
<option value="Saudi">Saudi</option>
<option value="Tunisia">Tunisia</option>
</select> <br>

<a href="info.php"> <input type='submit' value='Submit'> </a>

<!--Additional Info Page -->


<h1> Additional Information </h1>
<label> Short Biography: </label>
<textarea name ='biography'> </textarea> </br>

<label> Preferred Contact Method: </label>

<input type="radio" name ="method" id='email'> Email <br>


<input type="radio" name ="method" id='phone'> Phone <br>
<input type="radio" name ="method" id='mail'> Mail <br>

<label> Interests: </label>


<input type="checkbox" name="science"> Science
<input type="checkbox" name="arts"> Arts
<input type="checkbox" name="sports"> Sports
<input type="checkbox" name="technology"> Technology

<input type="submit" value="Submit">


</form>

<?php

?>

</body>

</html>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy