mardi 14 avril 2015

Can I have more actions in a form?

As I said in the title I need more than 1 action in a form... The form is for a log in script and it's like this:



<form method="post" action="action.php" name="loginform" id="loginform">
<br><br>
Username:<br> <input type="text" name="username" id="username" /><br><br>
Password:<br><input type="password" name="password" id="password" /><br /><br>
<input type="submit" name="login" id="login" value="Login" class="page"/>

<br>
<br>
<a href="register.php" class="page">Sign up</a>

</form>


The action.php page is like this:



<?php
include('index.php');
include('insert.php');
include('contact.php');
include('about.php');
?>


it seems to work the way I want it mostly but after I hit the log in button it redirects me to action.php page which includes all the pages above... I need this action.php page because if I log in I want to be logged in on all pages, not just one of them. Can I have it redirect to another page or something?


Aucun commentaire:

Enregistrer un commentaire