Greetings all.
I'm trying to use the variables of a form on a PHP file and it seems I'm not getting any luck. I'm getting a weird behavior .
Consider this example
file teste1.php (or teste1.html)
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="teste2.php" method="post" name="teste2f">
<input name="otexto" type="text">
<input name="btnOk" type="submit" value="ok">
</form>
</body>
</html>
file teste2.php
<?
if($otexto==""){
echo("empty text");
}
else{
echo($otexto);
}
?>
What texto2.php should do is show on screen the text that was entered on teste1.php. THIS DOES NO HAPPENS! (sorry the caps please). When teste2.php is loaded it enters on the if statement as true, i.e. , $otexto=="", writting allways the string "empty text " when the form realy sends the text on otexto variable (i can see it using the GET method) .
What is wrong? Any ideas? Please help!
Thank you very much.
Sรฉrgio .๐ ๐ ๐