Cita de: Shell Root en 4 Agosto 2010, 01:14 AM
You can generate the code or you can perform a function, any option is correct and you have the same result.
The function you call anywhere, the only thing that changes is the value. As the form is refreshed when the value of the variable changes (I use the GET method), so every time you change the value of the variable, the function is executed.
For example:Código (php) [Seleccionar]<?php
function fcheck($sParameter){
# Function for check value of variables
if($sParameter == 'a'){
return 'The value of the variable is: <b>a</b>';
}elseif($sParameter == 'b'){
return 'The value of the variable is: <b>b</b>';
}else{
return 'The value of the variable is: <b><i>NULL</i></b>';
}
}
?>
<html>
<head></head>
<body>
<center><a href='index.php?Parameter=a'>a</a> | <a href='index.php?Parameter=b'>b</a></center>
<br /><br />
<?php
echo fcheck($_GET['Parameter']);
?>
</body>
</html>
Displays the code you have. This will help you correct it.
Can you stop it? this isn't a english forum.