Topic: How to login with my own page

heelloo...

i want my user login in flash but where suppose the flash post?...
here my submit action script..

on (release) {
    if (Username eq "" or Password eq "") {
        stop();
    } else {
        loadVariablesNum("http://localhost/forum/login.php", 0, "POST");
        getURL('http://localhost/forum');

    }
}

but when redirected to forum index , it was not in logged in mode...
the url in loadVariablesNum is not correct i think...
can anybody help me what was wrong in the action script???

Re: How to login with my own page

I have no idea how Flash works, but aren't the variables called req_username and req_password? Also, you need to add a hidden form element called form_sent that should be set to 1.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: How to login with my own page

ok nevermind about flash...

but how to create a login page from my non-punbb forum site for example from my own mainpage...

where the form get posted to? and can u explain more details ?

Re: How to login with my own page

TRY THIS!

<script type="text/javascript">
<!--
function process_form(theform)
{
    var element_names = new Object()
    element_names["req_username"] = "Username"
    element_names["req_password"] = "Password"

    // Check for required elements
    if (document.images) {
        for (i = 0; i < theform.length; ++i) {
            if (theform.elements[i].name.substring(0, 4) == "req_") {
                if ((theform.elements[i].type=="text" || theform.elements[i].type=="textarea" || theform.elements[i].type=="password" || theform.elements[i].type=="file") && theform.elements[i].value=='') {
                    alert("\"" + element_names[theform.elements[i].name] + "\" is a required field in this form.")
                    return false
                }
            }
        }
    }

    // Disable any submit buttons we find
    if (document.all || document.getElementById) {
        for (i = 0; i < theform.length; ++i) {
            var elem = theform.elements[i]
            if (elem.type.toLowerCase() == "submit")
                elem.disabled = true
        }
        return true
    }

    return true
}
// -->
</script>       

<form name="login" method="post" action="<?php echo $pun_root;?>login.php?action=in" id="login" onsubmit="return process_form(this)">
<input type="hidden" name="form_sent" value="1">
<input type="hidden" name="redirect_url" value="<?php echo $_SERVER['REQUEST_URI']; ?>">
<td class="puncon2"><span class="puncon1right"><b><?php echo $lang_common['Username'] ?></b></span> 
<input type="text" name="req_username" size="20" maxlength="25">
<span class="puncon1right"><b><?php echo $lang_common['Password'] ?></b></span> 
<input type="password" name="req_password" size="10" maxlength="16">
<input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>"></td>
</form>