Webbserverprogrammering

Show sourcecode

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

webbsrvprg/exercises/

cart.php
idk.html
incl1.php
index.css
intro.php
ovn_forms1.php
ovn_forms1b.php
ovn_forms2.php
ovn_forms2b.php
ovn_forms3.php
ovn_forms3b.php
ovn_forms4.php
ovn_forms4b.php
ovn_forms5.php
ovn_forms5b.php
ovn_funct1.php
ovn_funct2.php
ovn_funct3.php
ovn_funct4.php
ovn_funct5.php
ovn_funct6.php
ovn_funct7.php
ovn_gr1.php
ovn_gr2.php
ovn_gr3a.php
ovn_gr3b.php
ovn_gr4.php
ovn_gr5.php
ovn_incl1.php
ovn_incl2a.php
ovn_incl2b.php
ovn_incl2c.php
ovn_strings1.php
ovn_strings1b.php
ovn_strings2.php
ovn_strings2b.php
ovn_strings3.php
ovn_strings4.php
ovn_strings4b.php
ovn_strings5.php
ovn_strings5b.php
quiz.php
sidslut.php
sidstart.php
text.php

ovn_strings5b.php

40 lines UTF-8 Windows (CRLF)
<?php 
    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="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>action page 2</title>
    <style>
        .container {
            text-align: center;
            margin-top: 30px;
        }

    </style>
</head>
<body class="container">
<?php
    $user 
= $_POST["user"];
    if (
str_contains($user, "php")){
        
$passw = $_POST["passw"];
        if (
strlen($passw) >= 6 ){
            echo 
"allt verkar stämma!";
            
$arr = ["1", "2", "3", ]
            if ()
        }
        else{
            echo 
"ditt lösenord måste vara längre!";
        }
    }
    else{
        echo 
"ditt användarnamn måste innehålla php!";
    }
?>

</body>
</html>