I am trying to create logins for users. I have an sql that inserts the information in a mysql database, but after that i don’t know how to actually start the login. As of now, I insert the information on join_action.php which then redirects to /index.php (below). Does session_start() on /index.php actually start the login? Becuase if so, it’s not working.
PHP (join_action.php):
$sql=mysql_query("INSERT INTO users VALUES ('','$name','$password','$email','$date','$time','$random','0','1','0')");
$id=mysql_insert_id();
$_SESSION['id'] = $id;
header("Location: http://localhost/index.php");
HTML (index.php top):
<?php session_start(); ?>
login.php (untested, but should give you the right idea)