-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
306 additions
and
387 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<html> | ||
<body> | ||
<?php | ||
|
||
if (isset($_POST['n1']) && isset($_POST['n2'])) | ||
echo $_POST['n1'] + $_POST['n2']; | ||
else | ||
echo "empty"; | ||
|
||
|
||
if (isset($_GET['n1']) && isset($_GET['n2'])) | ||
echo $_GET['n1'] + $_GET['n2']; | ||
?> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-image: url('image.jpg'); /* Replace 'your-image-url.jpg' with the actual URL or path to your image */ | ||
background-size: cover; /* This will cover the entire background */ | ||
background-repeat: no-repeat; /* Prevent image from repeating */ | ||
background-attachment: fixed; | ||
} | ||
form { | ||
width: 350px; | ||
margin: 0 auto; | ||
padding: 30px; | ||
background-color: #fff; | ||
border-radius: 5px; | ||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); | ||
} | ||
input[type="text"] { | ||
width: 100%; | ||
padding: 10px; | ||
margin-bottom: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 3px; | ||
} | ||
input[type="submit"] { | ||
background-color: #007bff; | ||
color: #fff; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 3px; | ||
cursor: pointer; | ||
} | ||
input[type="submit"]:hover { | ||
background-color: #0056b3; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<form action="add.php" method="post"> | ||
<input type="text" name="n1" placeholder="Enter number 1" /> | ||
<br> | ||
<input type="text" name="n2" placeholder="Enter number 2" /> | ||
<br> | ||
<input type="submit" name="submit" value="Submit"> | ||
</form> | ||
</body> | ||
</html> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<?php | ||
<head> | ||
<title>Calculator</title> | ||
</head> | ||
<body> | ||
<h1>Simple Calculator</h1> | ||
|
||
if (isset($_POST['n1']) && isset($_POST['n2'])) | ||
echo $_POST['n1'] + $_POST['n2']; | ||
else | ||
echo "empty"; | ||
<?php | ||
$result = ""; | ||
|
||
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | ||
if (isset($_POST['n1']) && isset($_POST['n2'])) { | ||
$n1 = floatval($_POST['n1']); | ||
$n2 = floatval($_POST['n2']); | ||
$result = $n1 + $n2; | ||
} else { | ||
$result = "Empty"; | ||
} | ||
} elseif ($_SERVER['REQUEST_METHOD'] === 'GET') { | ||
if (isset($_GET['n1']) && isset($_GET['n2'])) { | ||
$n1 = floatval($_GET['n1']); | ||
$n2 = floatval($_GET['n2']); | ||
$result = $n1 + $n2; | ||
} else { | ||
$result = "Empty"; | ||
} | ||
} | ||
?> | ||
|
||
<form method="post" action="calculator.php"> <!-- Replace "calculator.php" with the actual filename of this HTML file --> | ||
<label for="n1">Number 1:</label> | ||
<input type="text" name="n1" id="n1" required> | ||
<br> | ||
<label for="n2">Number 2:</label> | ||
<input type="text" name="n2" id="n2" required> | ||
<br> | ||
<input type="submit" value="Add"> | ||
</form> | ||
|
||
if (isset($_GET['n1']) && isset($_GET['n2'])) | ||
echo $_GET['n1'] + $_GET['n2']; | ||
?> | ||
<?php | ||
if (!empty($result)) { | ||
echo "Result: " . $result; | ||
} | ||
?> | ||
|
||
</body> | ||
</html> | ||
</html> |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.