Jump to content


Form Help

  • Please log in to reply
2 replies to this topic

#1 craigbabe

  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 29 April 2006 - 03:18 AM

I have searced and tried so many things Im just out of ideas.. My hose went down and when it came back up people could not log back in..

When you are not logged in you are redirected to a login page..

$CookieUser = $_SESSION['name'];
$CookiePass = $_SESSION['pass'];
$domain = "http://www.simupets.com";

echo"<br> <form method=\"post\" action=\"$domain/login.php\">
                  <input type=\"hidden\" name=\"act\" value=\"login\">
                &nbsp;&nbsp;&nbsp;<input name=\"username2\"  class=\"inputf\" size=\"9\" value=\"username\"
onblur=\"if(this.value=='') this.value='username';\" onfocus=\"if(this.value=='username') this.value='';\"><br>
                &nbsp;&nbsp;&nbsp;<input class=\"inputf\" name=\"password2\" size=\"9\" type=\"password\"
value=\"Password\" onblur=\"if(this.value=='') this.value='Password';\" onfocus=\"if(this.value=='Password')
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"submit\" class=\"submit\" value=\"Login\">

This is what I have for my user auth

if($act=="login") {
        if($act == "in") {
        if(!$act) {
        if(!$CookieUser) {
        require('login/form.php'); // I always get this outcome
        } else {


I dont know whats wrong... I used $_POST['act'] but I get a white space error.. It seems the infomation in the form is not being submitted or something? Can anyone figure the problem?

#2 michaellunsford

  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 29 April 2006 - 03:40 AM

Hey, very awesome javascripting --- I wrote something similar to this a while back -- but it was way bulky. Very smooth. I'm impressed!

On the problem at hand: It's tough to see the exact progress of your login with all the missing code -- but when I get errors that make no sense (like this one), I always test with a quick print_r($_POST); just to see what is hiding in the $_POST array. Most of the time it answers whatever question I have.

#3 craigbabe

  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 29 April 2006 - 03:51 AM

Thankyou, Javascript is so handy :).

Thanyou you are a bloody legend! It worked I figured out from there :D Thanks so much!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users