Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Amp47 authored Feb 6, 2023
1 parent 42eb02c commit 1153296
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
69 changes: 69 additions & 0 deletions LAB 2/form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<html>

<body>
<!-- TEXT BOX first one -->
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <!-- GET -> POST and back to the startPAGE -->
Name: <input type="text" name="fname">
<input type="submit">
<!-- Text Area -->
<h1>This is Webtech Section [A] Laboratory</h1>

<!-- Radio Area -->
<p>Please select your tasks:</p>
<input type="radio" id="tsk1" name="tsk" value="5">
<label for="tsk1">This is Task 1</label><br>
<input type="radio" id="tsk2" name="tsk" value="5">
<label for="age2">This is Task 2</label><br>
<input type="radio" id="tsk3" name="tsk" value="5">
<label for="tsk3">This is Task 3</label><br><br>
<input type="submit" value="Submit"><br><br>

<!-- CheckBox Area -->
<input type="checkbox" id="lab1" name="lab" value="5">
<label for="lab1"> This is lab 1.</label><br>
<input type="checkbox" id="lab2" name="lab" value="5">
<label for="lab2"> This is lab 2.</label><br>
<input type="checkbox" id="lab3" name="lab" value="5">
<label for="lab3"> This is lab 3.</label><br><br>
<input type="submit" value="Submit"><br><br>

<!--SELECT area -->
<label for="hobbies">Choose a hobby:</label>
<select name="hobbies" id="hobbies">
<option value="gaming">Gaming</option>
<option value="exercising">Exercising</option>
<option value="gardening">Gardening</option>
<option value="reading">Reading</option>
</select><br><br>
<input type="submit" value="Submit"><br><br>

<!-- Textbox Area -->
<p><label for="coursereview">Review of Web Technologies:</label></p>
<textarea id="coursereview" name="coursereview" rows="4" cols="50">At Webtech course you will learn how to make a website. They offer necessary materials for whole week.</textarea>
<br>
<input type="submit" value="Submit">


</form>




<?php
if ($_SERVER["REQUEST_METHOD"] == "POST")
// collect value of input field
$name = $_REQUEST['fname'];
if (empty($name)) {
echo "Name is empty!";
} else {
echo $name;
}




?>

</body>

</html>
18 changes: 18 additions & 0 deletions LAB 2/lab2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LAB-3-Section-[A]</title>
</head>

<body>
<?php
echo "hello"
?>

</body>

</html>

0 comments on commit 1153296

Please sign in to comment.