Jump to content

Problems with my login form can some one just look and help.


Pieter Lategan

Recommended Posts

Hi

Can someone help me with the following problem I struggle with my login form.

I publish both forms one is my html and the other one is my php.
I'm not sure if I'm on the right track with the forms.

Thank you very much

<html>
<head>
<title>A Basic HTML Form</title>


</head>

<body>
<form name="form1" Method ="POST" action="submitForm.php">
<p><input type="text" name="text" value="Name"value="<?php print$username;?>"</p>
<p><input type="text" value = "username" value="<?php print$username;?>"</p>
<input type="Submit" name= "Submit1" Value= "login">


</form>
</body>
</html>


///////////////////////////////////


<?php
session_start();



// check username and password information
if (($_SESSION['Name'] == 'Pieter') and
($_SESSION['username']=='pieteral')) {
$_SESSION['authuser'] = 1;
} 
else {
echo "Sorry, but you don't have permission to view this page, you loser!";
exit();
}
?>


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.