What I need is when they click "submit" it inserts the information into the database and redirects them to another page "attentionError.php".
If you can help me that would be great.
*EDIT* I was told this is not an html option. It is done with PHP. Someone posted that there are multiple tutorials online for this but I just don't know where to find or how to operate it. Most of the tutorials just redirect the page as soon as you go to the link. I want it so when they click "submit" the <input type="submit" /> that the information is sent to the database and the page forwards to another page (such as ones saying "you have logged in successfully but without having to use echo). *EDIT*
Last edited by ThunderWaffe; 09-27-2012 at 12:24 AM..
If anyone knows of a tutorial or knows how to do it (even if you don't know exactly) please post! I'm desperate for answers! I've been searching all night and I can't find a thing for exactly this I want!
//sends form to login.php and sends to mysql. If I change it to errorAttention.php (the site I want) it works how I want but the form data doesn't get sent to my mysql <form action="login.php" method="post">
<span class="inputLabel FlatHeader">Login:</span>
<div class="InputBoxLeft"><input type="text" title="Login" name="username" maxlength="200" size="26" value="" id="username" class="NoPlaceholder" ></div>
<span class="inputLabel FlatHeader">Password:</span>
<div class="InputBoxLeft"><input type="password" title="Password" name="password" maxlength="20" size="26" value="" id="password" class="NoPlaceholder" ></div>
//submit button below. I want it to submit the data and basically have a link to another page. <span class="Button Button29" id="modalLoginButton"><span><span><span class=""><b>Login</b></span><input type="submit" name="submit" title="Login"/></span></span></span>
<a class="PasswordLink" href="*******.php" target="_parent">Forgot Password?</a>
$con = mysql_connect("*********","**********","***********");
die("Can not connect: " . mysql_error());
$sql = "INSERT INTO users (Username,Password) VALUES ('$_POST[username]','$_POST[password]')";
In your example, you are redirecting before the Database queries are executed. You should use the redirect at the end of your PHP Script.
__________________ "Be formless... shapeless, like water. Now you put water into a cup, it becomes the cup. You pour water into a bottle; it becomes the bottle. You put water into a teapot; it becomes the teapot. Now water can flow, or creep or drip or crash! Be water, my friend..." by Bruce Lee