Question : How to write a simple PHP login script

Please look atc the code below, and let me know exactly hoe to  write a login script so that the newly registered user can go to a webpage named: "pageOne.php"?

Thanks!
John
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
REGISTRATION:
<div style="width:100px;  text-align:right; float:left">
<div style="height:21px; line-height:20px">username</div>
<div style="height:21px; line-height:20px">password</div>
<div style="height:21px; line-height:20px">email</div>
</div>

<div style="width:200px; padding: 0 0 0 10px; float:left">
    <form action="insert2.php" method="post">
    <input type="text" name="username" /><br />
    <input type="password" name="password" /><br />
    <input type="text" name="email" /><br /><br />
    <input type="submit" value="Submit" />
    </form>
</div>
----------------------------------
INSERT USER INFO:
<?php
$con = mysql_connect("localhost","My username","1234");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("My Db", $con);

$sql="INSERT INTO users (username, password, email)
VALUES
(
'$_POST[username]','$_POST[password]','$_POST[email]')";

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
$fname = $_POST['username'];
header("location: welcome2.php?fname=".urlencode($fname));
mysql_close($con)
?>

Answer : How to write a simple PHP login script

Several things can cause this, and it would be difficult to difinatively tell you without seeing the event logs on your workstation and DC.  You can correct it by disjoining the computer from the domain, checking AD to make sure the computer record was removed (wait for replication if necessary), and rejoining the workstation to the domain.

Justin

Random Solutions  
 
programming4us programming4us