Show sourcecode
The following files exists in this folder. Click to view.
ovning_strings1.php
ovning_strings1_mot.php
ovning_strings2.php
ovning_strings2_mot.php
ovning_strings3.php
ovning_strings3_mot.php
ovning_strings4.php
ovning_strings4_mot.php
ovning_strings5.php
ovning_strings5_mot.php
ovning_strings6.php
ovning_strings6_mot.php
ovning_strings4_mot.php
25 lines UTF-8 Windows (CRLF)
<?php
$fname = mb_convert_case($_GET["fname"], MB_CASE_TITLE);
$ename = mb_convert_case($_GET["ename"], MB_CASE_TITLE);
$epost = $_GET["epost"];
echo "
<!DOCTYPE html>
<html lang='sv'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Hej, $fname</title>
</head>
<body>";
// minst 1 bokstav, sedan en @, sedan minst 3 bokstäver, sedan ., sedan minst 2 bokstäver
if (!preg_match("/.+@.{3,}\..{2,}/", $epost)) {
echo "Ogiltig epost!";
}
else {
echo "Du heter $fname $ename, och din epost är $epost";
}
?>
</body>
</html>