Hey, after a while figuring it out why all kinda seem to fail I noticed I had to use a different approach and must use the $_SERVER['PHP_SELF']; Function.
So this is the small scripting part of right now.
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
Username:<br>
<input type="text" size="10" name="Username"><br>
Password:<br>
<input type="password" size="10" name="password"><br>
<input type="submit" value="login" name="logged">
</form>
<?php
if(isset($_POST["Username"]) && isset($_POST["password"]))
{
$username=$_POST["Username"];
$password=$_POST["password"];
$pattern='[0-9]';
if (strlen($username) <3 || (preg_match ("/$pattern/", $username)))
{echo "Invalid User <br>";}
else
{
echo "Welcome: . $username . ";
}}
?>
The PHP coding goes to the include.
Now I got mine variables however they will not work until it has been set.
For the login page it's fine to have the both text on the bottom of the loging script when the login is failed (I still am going to add the trim() function for the sql injection) however for the registration page I want that the $username variables goes at the bottom of the username input type text field.
May be some'one got a tutorial on this part and perhaps it's by ajax, java script or some kind of that programming , I then don't mind to study it.
Thanks a lot in advance.