mercredi 25 mai 2016

PHP Get not correctly working [duplicate]

This question already has an answer here:

i have a small problem but i have no idea, why this simple script does not work. We have a long script, where we have many Get-Parameters. In this Case, we have

$schriftart = $_GET['S'];

If a User does not run the code with a parameter, the $schriftart should be "1"

if (empty($schriftart)) {
    $schriftart="1";
    }

Than we going to this:

if ($schriftart="1") {
$font = './arial.ttf';
$fontitalic = './arial.ttf';
}

if ($schriftart="2") {
$font = './TrebuchetMS.ttf';
$fontitalic = './TrebuchetMS.ttf';
}

if ($schriftart="3") {
$font = './TrebuchetMSItalic.ttf';
$fontitalic = './TrebuchetMSItalic.ttf';
}

When i run the Code, the Font is TrebuchetMSItalic, without running it with parameters. What am i doing wrong? I really don't know. It will be great, if you can find a solution for this problem.

Aucun commentaire:

Enregistrer un commentaire