Webbserverprogrammering 1

Show sourcecode

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

Webserver1/Ovningar/Strings/

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_strings1_mot.php

24 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>"
;
  
  if (!
preg_match("/@/"$epost)) {
    echo 
"Ogiltig epost!";
  }
  else {
    echo 
"Du heter $fname $ename, och din epost är $epost";
  }
  
?>
</body>
</html>