re-arranged user flow to display assignment first, with the optional button to access information from spotify.

This commit is contained in:
Joshua Ashton
2025-02-04 12:34:29 -07:00
parent 1888f11fe5
commit ea1def7409
111 changed files with 12269 additions and 128 deletions
+1 -20
View File
@@ -7,7 +7,7 @@
<body>
<h1>Palindrome Tester</h1>
<form action="index.php" method="[post | get]">
<form action="palindrome.php" method="post">
<input type="text" name="input">
<input type="submit">
</form>
@@ -15,22 +15,3 @@
</body>
</html>
<?php
$input = $_GET['input'];
$sanitized_input = sanitize_input($input);
if ($sanitized_input == strrev($sanitized_input))
$output = '<p>Is Palindrome</p>';
else
$output = '<p>Is Not Palindrome</p>';
function sanitize_input($input)
{
$invalid_chars = [' ', "'", '?', '/', '\\', '.', ','];
$output = strtolower($input);
$output = trim($output);
$output = str_replace($invalid_chars, '', $output);
return $output;
}
?>