1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input name="textfiled" type="text" id= textfiled />
<input name="ok" type="submit" id="ok" value="send" />
</label>
<?
$myvar = 'textfiled';
echo "<br> the value of the variable \$myvar is : $myvar <br>";
if (is_numeric($myvar))
{
$myvar= $myvar*1;
}
if ($myvar == "yes" or $myvar == "no" or $myvar == "true" or $myvar == "false")
{
settype($myvar,"boolean");
}
echo "the data type of \$myvar is :" . gettype($myvar);
?>
</form>
</body> |