diff --git a/5min/day4/index.php b/5min/day4/index.php new file mode 100644 index 0000000..6e3acc4 --- /dev/null +++ b/5min/day4/index.php @@ -0,0 +1,45 @@ + + + + + Dummy Title + + + + +

Hello cruel world!

+
+ + +
+ + + + + E-Commerce + + + EOL; + +echo $head; diff --git a/catalog/index.php b/catalog/index.php index e69de29..e0e6bf3 100644 --- a/catalog/index.php +++ b/catalog/index.php @@ -0,0 +1,9 @@ +'; +echo ''; +include('head.php'); + +echo ''; +include('nav.php'); +echo ''; +echo ''; diff --git a/catalog/nav.php b/catalog/nav.php index e69de29..412e201 100644 --- a/catalog/nav.php +++ b/catalog/nav.php @@ -0,0 +1,19 @@ + + + + EOL; + +echo $nav; diff --git a/palindrome/index.php b/palindrome/index.php new file mode 100644 index 0000000..eeac75c --- /dev/null +++ b/palindrome/index.php @@ -0,0 +1,36 @@ + + + + + Palindrome Tester + + + +

Palindrome Tester

+
+ + +
+ + + + + +Is Palindrome

'; +else + $output = '

Is Not Palindrome

'; + +function sanitize_input($input) +{ + $invalid_chars = [' ', "'", '?', '/', '\\', '.', ',']; + $output = strtolower($input); + $output = trim($output); + $output = str_replace($invalid_chars, '', $output); + + return $output; +} +?> diff --git a/palindrome/palindrome.php b/palindrome/palindrome.php new file mode 100644 index 0000000..fa3d859 --- /dev/null +++ b/palindrome/palindrome.php @@ -0,0 +1,37 @@ +Is Palindrome

'; +else + $output = '

Is Not Palindrome

'; + +function sanitize_input($input) +{ + $output = strtolower($input); + $output = trim($output); + $output = str_replace([',', ' '], '', $output); + + return $output; +} +?> + + + + + + Palindrome Tester + + + +

Palindrome Tester

+
+ + +
+ + + +