help me

Gestart doorRohimma1 reacties33 weergaven

2 berichten · pagina 1 van 1

Rohimma

Lid · Topicstarter

Berichten
1.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hallo allemaal

ik heb een script op mijn computer staan maar daar moet wat aan verandert worden maar ik weet niet hoe.

dit is het script:

[COLOR= #0000BB]<?php
$a[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$b[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]4[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$a[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] is gelijk aan [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$b[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]![/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$a[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] is groter dan [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$a[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] is kleiner dan [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700];
}[/COLOR]
?>


maar ik wil dan op de pagina van de site dan zelf $a = 2; en $b = 4; kunnen invullen.

weet iemand hoe dat moet???

gr, rohimma
0
Tim

Lid

Berichten
712
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ok[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$a[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]a[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$b[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$a[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] is gelijk aan [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$b[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]![/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$a[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$a[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] is groter dan [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$a[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000] is kleiner dan [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$b[/COLOR][COLOR= #007700];
}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<form method="post"><input type="text" name="a" value="getal 2"><input type="text" name="b" value="getal 2"><input type="submit" value="vergelijk" name="ok"></form>[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Volgens mij werkt dat wel, zitten alleen geen controles in mbt de ingevulde data, dus dat kan je er eventueel zelf aan toevoegen wink
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren