Jump to content

Form Help


craigbabe

Recommended Posts

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..

[code]
$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')
this.value='';\"><br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"submit\" class=\"submit\" value=\"Login\">
               </form><br>";
[/code]


This is what I have for my user auth


[code]

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

        }

[/code]


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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.