HELP! i got stuck showing a variable value
Posted: Tue Apr 16, 2013 7:50 am
Hello all php coders,
Can you just take a few seconds to see what problem i am having in this code, i spent more than 5 hours to get the solution but without success
* Well let me first explain a little bit the goal of this little code,
---> First page Test.html
we have this code :
---> Second page welcome.php // where the posted data will be submited!
we have this code:
-----> last page where i want exactly my name be shown
it doesn't display here that's what am asking about :/
anoir.php
some code here
variable must be display here
---------------------------------------------------------------------------
Can you just take a few seconds to see what problem i am having in this code, i spent more than 5 hours to get the solution but without success
* Well let me first explain a little bit the goal of this little code,
---> First page Test.html
we have this code :
Code: Select all
<html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="name">
<input type="submit">
</form>
</body>
</html>we have this code:
Code: Select all
<?php
$an= file_get_contents('./anoir.php');
$f = $_POST['name'];
if($f == anoir){
print $an;
} else { ''; }
?>
anoir.php
some code here
variable must be display here
Code: Select all
<? echo .$_POST['name'].''; ?>