Below is a simple php file that recieves input from a form html file. The php file outputs the first and last name, but their is no space between the names. Does anyone know how I can get a space between name in the php file?
As a minimum this will work:
<?
print("<p>"$fusername." ".$lusername."</p>");
?>
But it's a better idea to do something like this (assuming your form on the preceding page is like the following):
<form name="yourform" action="yourscript.php" method="post">
You'd want to do this in yourscript.php:
<?
// Remove any tags from all $_POSTed variables to avoid xss problems foreach($_POST as $key => $value) { $_POST[$key]=strip_tags($value); }
print("<p>".$_POST['fusername']." ".$_POST['lusername']."</p>");
?>
- Ben
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php