Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webb_srv1/exercises/

aside.php
form-quiz-3/
formular7.php
funktioner.php
grunder.php
string4.php
string_form4.php

string4.php

31 lines UTF-8 Windows (CRLF)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Stängar</title>
<style>
input {
 display: block;
}

</style>
</head>

<body>
<h1>Strängar</h1>
<h3>Uppgift 4</h3>
<?php
if(isset($_POST['email'])) {
 
$email $_POST['email']; 
 if (
preg_match_all("/^[\w.-]+@[\w.-]+\.[A-Za-z]{2,4}$/"$email) == 1) {
  echo 
"<p>EMAIL OK!</p>";
 }
 else {
  echo 
"<p>EMAIL INTE OK!</p>";
 }
}

include(
'string4_form.php');
?>
</body>
</html>