almost got this one working PHP help

It almost works… when you enter your name and submit it says hello and the number one instead of the first name…

[code]

Hi User

Hi User

[php]<?php

if (filter_has_var(INPUT_POST, “userName”) && filter_has_var(INPUT_POST, “bName”)){

// the form exists, so work with it
$userName = filter_input(INPUT_POST, “userName”) && $bName = filter_input(INPUT_POST, “bName”);
print “

Hi there, $userName $bName

\n”;

} else {

//there’s no input. Create the form
print <<< HERE

Please enter your name Please enter your name submit HERE;

} // end ‘value exists’ if

?>[/php]

[/code]
Sponsor our Newsletter | Privacy Policy | Terms of Service