*sigh*
Well, you can use:
setcookie("username", $username, time()+1000);
with $username being a variable of their logged-in user name. That would let you make cookies to check for log-in.
You could get the value with:
$_COOKIE['username"] or check if it's set with
if (isset($_COOKIE["username"]))
Last edited by SeptimusHeap (2011-01-24 18:28:50)
Offline
good job! i'll work on it!
Offline
MySql Database with Usernames and passwords:
<?php
$con = mysql_connect("servername","username","pass");
if (!$con)
{
die('Error: ' . mysql_error());
}
// Create database
if (mysql_query("CREATE DATABASE un _pass",$con))
{
echo "Database created";
}
else
{
echo "Error: " . mysql_error();
}
// Create table
mysql_select_db("un_pass", $con);
$sql = "CREATE TABLE Users
(
Username varchar(15),
Password varchar(15),
)";
// Execute query
mysql_query($sql,$con);
mysql_close($con);
?>
Makes a MySQL database and a table with usernames and passwords.
mysql_query("INSERT INTO Users (Username, Password)
VALUES ('$_POST[username]', '$_POST[password]') ")
Adds a UN and pass to the list when connected using
$con = mysql_connect("servername","username","pass");
if (!$con)
{
die('Error: ' . mysql_error());
}
Last edited by SeptimusHeap (2011-01-24 19:27:04)
Offline
Cool! thats good! I'll have to add it...
Offline
jfmlove6 wrote:
Is this going to be for the social network thingy you were going to make with some other people? Oh, and I also left a comment.
yes this is.
Offline