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
+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>