I have an apache installation (ubuntu) that runs php just fine. The problem comes when i run this code:
index.php
Code: Select all
<?php
$machine = check_input($_POST['machine']);
$metric = check_input($_POST['metric']);
$interval1 = check_input($_POST['interval1']);
$interval2 = check_input($_POST['interval2']);
?>
<html>
<body>
Máquina: <?php echo $machine; ?><br />
Métrica: <?php echo $metric; ?><br />
Intervalos de tiempo: <?php echo $interval1; ?> <?php echo $interval1; ?><br />
<br />
</body>
</html>
<?
function check_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>[text]Máquina:
Métrica:
Intervalos de tiempo: [/text]
Am I doing something wrong?
Thanks!