HELP! i got stuck showing a variable value

[size=10pt]
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 :frowning:

  • Well let me first explain a little bit the goal of this little code,
    —> First page Test.html
    we have this code : [php]
Name: [/php]

—> Second page welcome.php // where the posted data will be submited!
we have this code: [php]

<?php $an= file_get_contents('./anoir.php'); $f = $_POST['name']; if($tf == anoir){ print $an; } else { ''; } ?>

[/php]

-----> last page where i want exactly my name be shown :slight_smile: it doesn’t display here that’s what am asking about :confused:
anoir.php

some code here
variable must be display here
[php]<? echo .$_POST['name'].''; ?>[/php]

[/size]

Try this:

welcome.php:

[php]

<?php $f = $_POST['name']; if($f == 'anoir'){ include "./anoir.php"; } ?>[/php]

anoir.php:

[php]

Welcome <?php echo $f; ?> [/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service