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...
Problem with form action...
Moderator: General Moderators
This is because you don't have register_globals turned on (which is good!)
so, to retrieve the data do this
Mark
so, to retrieve the data do this
Code: Select all
<?
echo "hello ".$_POST['nomep'];
?>
Last edited by JayBird on Thu Jan 15, 2004 11:11 am, edited 1 time in total.
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Thank you...
... and it was so simple....
tku..
tku..