This commit is contained in:
2025-03-31 12:45:58 -06:00
parent b6f707c929
commit 282ad2d8cb
327 changed files with 340 additions and 192 deletions
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Regular → Executable
+7 -7
View File
@@ -1,7 +1,7 @@
<?php
$error = '';
if (isset($_GET['error']))
$error = $_GET['error'];
$error = $_GET['error'];
?>
<!doctype html>
@@ -9,14 +9,14 @@ if (isset($_GET['error']))
<head>
<title>Validation</title>
<link href="css/styles.css" type="text/css" rel="stylesheet">
<script src="js/index.js"></script>
<link href="validation/css/styles.css" type="text/css" rel="stylesheet">
<script src="validation/js/index.js"></script>
</head>
<body>
<h1>Validation Assignment</h1>
<form action="process.php" method="post">
<form action="validation/process.php" method="post">
<input name="phone_number" type="text" placeholder="(xxx)xxx-xxxx" <?php $error ? 'value="' . $error . '"' : '' ?>>
<div class="row">
<button>Submit</button>
@@ -25,7 +25,7 @@ if (isset($_GET['error']))
</form>
<?php
if ($error) {
if ($error) {
echo '
<div class="card error">
<h3 class="error">Invalid Format</h3>
@@ -33,8 +33,8 @@ if ($error) {
<p class="error">Phone number must be formatted as (xxx)xxx-xxxx.</p>
</div>
';
}
?>
}
?>
</body>
</html>
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+8 -8
View File
@@ -2,16 +2,16 @@
<html lang="en">
<head>
<title>Dummy Title</title>
<link href="css/styles.css" type="text/css" rel="stylesheet">
<script src="js/index.js"></script>
<title>Dummy Title</title>
<link href="validation/css/styles.css" type="text/css" rel="stylesheet">
<script src="validation/js/index.js"></script>
</head>
<body>
<h1>Validation Assignment</h1>
<?php
validate($_POST['phone_number']);
?>
<h1>Validation Assignment</h1>
<?php
validate($_POST['phone_number']);
?>
</body>
@@ -27,7 +27,7 @@ function validate($number)
<div class="card success">
<h3 class="success">Thank You!</h3>
<p class="success">You entered: ' . $number . ', a valid phone number.</p>
<img src="img/success.jpg" />
<img src="validation/img/success.jpg" />
</div>
';
} else {