So.. I've found a way to get a login & register site and stuff.
but I seem to have some probs :/
This is my website. Website
Its all about testing stuff so not going to be a very public site.
If you click register it.. well.. it shows alot of weird stuff that shouldn't be there and it is missing a button to submit.
Here are the codes.
(NOTE! I used [URL http://www.daniweb.com/forums/thread97183.html#] this link[/URL] apologize for it to be another website than MMOwned.(No offense) and the explanation from the guy "Macneato")
Login.php
HTML | <html> <head> </hea - Login.php - qtQEMpeP - Pastebin.com
Register.php
HTML | <html> <head> <body - Register.php - XcJU9Xmk - Pastebin.com
Logout.php(small code so not in pastebin)
Logout.phpHTML Code:<html> <body> <?php session_start(); session_unset(); session_destroy(); Header("Location: index.php"); ?> </html> </body>
dbConfig.phpHTML Code:<?php session_start(); if (!$_SESSION["valid_user"]) { Header("Location: login.php"); } echo "<p>User ID: " . $_SESSION["valid_id"]; echo "<p>Username: " . $_SESSION["valid_user"]; echo "<p>Logged in: " . date("m/d/Y", $_SESSION["valid_time"]); echo "<p><a href=\"logout.php\">Click here to logout!</a></p>"; ?>
HTML | <? $host = "localhost"; $ - DbConfig.php - NLaRHUyM - Pastebin.com
If you know what to do or what's wrong with these scripts. Or know how to make it work. or a script with a step-by-step guide to create a login page.
Please post it here. Or if it is too much to ask. You can always add me on MSN: [email protected]
-Thanks in advance!