Webbserverprogrammering 1

Show sourcecode

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

ramverket/exercises/formular/

ovn_form1-1.php
ovn_form1-2.php
ovn_form2-1.php
ovn_form2-2.php
ovn_form3-1.php
ovn_form3-2.php
ovn_form4-1.php
ovn_form4-2.php
ovn_form5-1.php
ovn_form5-2.php
ovn_form6-1.php
ovn_form6-2.php
ovn_form7-1.php
ovn_form7-2.php
ovn_form8.php

ovn_form3-2.php

24 lines UTF-8 Windows (CRLF)
<?php
  
// Title: Formulär 3
  
error_reporting(-1); // Report all type of errors
  
ini_set('display_errors'1); // Display all errors
  
ini_set('output_buffering'0); // Do not buffer outputs, write directly
?>

<!DOCTYPE html>
<html lang="sv">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Formulär 3</title>
</head>
<body>
  <?php
    $first_name 
$_POST['first_name'];
    
$last_name $_POST['last_name'];
    
$class $_POST['class'];
    
$food $_POST['food'];
    echo 
htmlspecialchars("Hej $first_name $last_name i $class! Din favoritmaträtt är $food!");
  
?>
</body>
</html>