Problem with form action...
Posted: Thu Jan 15, 2004 10:53 am
Hi. ppl
taking first steps in php and i've a problem i can't resolve.
i'm trying to pass a var from a php page to another, ok in the manual this is very simple.
the initial page have the following code...
"infopessoal.php"
<html>
(...)
<form action= "ver.php" method="post">
nome:<input name="nomep" type="text">
<input type="submit">
</form>
so my "ver.php" page must test the varible, ok? and i've limited the code to the minimal ... only a echo (just for testing)...
<html>
(...)
<?
echo "hello $nomep";
?>
when i test it in server the response is:
hello PHP Notice: Undefined variable: nomep in c:\folder\ver.php on line 10.
however in the address bar the value passes... (.../ver.php?nomep=xpto).
I know this is a fooling question, but ill be really grateful for your help...
taking first steps in php and i've a problem i can't resolve.
i'm trying to pass a var from a php page to another, ok in the manual this is very simple.
the initial page have the following code...
"infopessoal.php"
<html>
(...)
<form action= "ver.php" method="post">
nome:<input name="nomep" type="text">
<input type="submit">
</form>
so my "ver.php" page must test the varible, ok? and i've limited the code to the minimal ... only a echo (just for testing)...
<html>
(...)
<?
echo "hello $nomep";
?>
when i test it in server the response is:
hello PHP Notice: Undefined variable: nomep in c:\folder\ver.php on line 10.
however in the address bar the value passes... (.../ver.php?nomep=xpto).
I know this is a fooling question, but ill be really grateful for your help...