I am still not fully aware of what you are wanting... However I have the rough idea that you want to click login then get redirected to a page with alot of forms, etc... So use JavaScript, although now your actual login? I don't see any data to really submit(reason why I chose javascript, although PHP would work just as effectively)
PHP Code to Redirect:
Code:
<?php header("Location: http://www.mysite.com/pagetogoto.html"); ?>
JavaScript Code to Redirect:
Code:
<script language="javascript">
function login() {
window.location = "http://www.mysite.com/"
}
</script>
For the submit button for the JavaScript Method:
Code:
<input type="submit" onClick="login()" value="LOGIN"
PS: If you go the JavaScript Method, may I recommend you remove the form or give the action attribute a "#" value.
PPS: For a basic login system, you would need to create a form like this:
Code:
<form action="login.php" method="POST"><input type="text" size="20" name="user" /><br /><input type="password" size="20" name="pass" /><br /><input type="submit" value="Submit" /></form>
Then for the "login.php" file, you would use code similiar to this:
Code:
<?php
//Starts Session
session_start;
//Connects to Host
$link = mysql_connect("hostname", "username", "password");
if($link) {
//Selects Database
$select = mysql_select_db("databasename");
if($select) {
//Removes Special Characters from submitted data
$user = mysql_real_escape($_POST['user']);
$pass = mysql_real_escape($_POST['pass']);
//Locates User
$query = mysql_query("SELECT * FROM tablename WHERE user = '".$user."' AND password = '".md5($pass)."'");
$result = mysql_num_rows($query);
if($result == 1) {
//Gathers User Data from file
$row = mysql_fetch_array($query);
//Sets variable to check whether user is logged in on other pages
//Just use a simple if($_SESSION['active'] == true) {perform actions}
//REMEMBER TO START YOUR SESSION
$_SESSION['active'] = true;
//Uncomment one of the following to script lines
//Redirects the user to a general page
//header("Location: http://mysite.com/pagetogoto.html");
//Redirects the user to a per user page
//header("Location: http://mysite.com/pagetogoto.php?id=".$row[id]);
} else {
echo "No user found.";
}
} else {
echo "Could not select database";
}
} else {
echo "Could not connect to host";
}
?>
Take note that script is very rough and would ofc need to be customised abit, hope it helps you abit though...
PPPS: Apologies for any errors that it might contain... I was pressed for time, I can update it to be more accurate later if you so wish