vilify
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Downloads
Gallery
Store
Posts posted by vilify
-
-
My Issue: My form will not submit. It will just refresh login.php, whereas it should be posting to login_sub.php
was handling all the login with login.php, but decided to add that to a different page to further diagnose the problem.
I really dont understand why it wouldnt submit.
Im running these and some other functions on a few other pages right now, like inserting into mysql, and those work perfectly fine.
The code:
Includes on login.php
<?php include('lib/class_lib.php'); ?> <?php $session = new funcs(); $session->session(); $user_login = new funcs(); $user_login->login_submit(); $user_logout = new funcs(); $user_logout->logout(); ?>
My login.php form
<form name="login" action="login_sub.php" method="POST"> <label>Username:</label> <input name="uname" type="text" /> <br /><br /> <label>Password:</label> <input name="pword" type="password" /> <br /><br /> <input name="submit" value="Log In" type="submit" /> </form>
the called functions. login_submit() is irrelivent atm because I have replaced calling that variable with just a straight forward action
function session() { if (!isset($_SESSION)) { session_start(); } } function logout() { // ** Logout the current user. ** $this->logout_link = $_SERVER['PHP_SELF']."?doLogout=true"; if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){ $this->logout_link .="&". htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){ //to fully log out a visitor we need to clear the session varialbles $_SESSION['MM_Username'] = NULL; $_SESSION['MM_UserGroup'] = NULL; $_SESSION['PrevUrl'] = NULL; unset($_SESSION['MM_Username']); unset($_SESSION['MM_UserGroup']); unset($_SESSION['PrevUrl']); $this->logout_direct = "login.php"; if ($this->logout_direct) { header("Location: $this->logout_direct"); exit; } } }
PHP Form Problem
in Advanced Web Design
Posted
figured out my problem, but unsure how to fix it.
lies within this code.
login_rs is getting set properly, but the query from login_query is not outputting anything.