Need help php bridge for WBB

BIOS

Knowledge Seeker
VIP
Joined
Oct 10, 2015
Messages
409
Reaction score
805
Points
168
Age
30
Location
Germany
this is my login script

Code:
            <div id="bottom">
                <div id="left">
                    <div id="panel">
                        <div class="title">User Area</div>
                        <div class="body">
                            <?php
                            if (!$_SESSION["MM_Username"]) {
                                print'<br><form method="POST">
        <center><input type="text" name="username" placeholder="Username" id="login"><br>
        <input type="password"  name="password" placeholder="Passwort"><br><br>
        <input type="submit" value="Login" name="login" width="100" height="25"/><br><p><br>
        <a href="pass_recovery.php">Password vergessen?</a> | <a href="register.php">Registrieren</a></center>';
                                if ($_POST['login']) {
                                    $username = mysql_real_escape_string($_POST['username']);
                                    $password = mysql_real_escape_string($_POST['password']);
                                    $password = sha1(strtoupper($username) . ":" . strtoupper($password));
                                    $doesExist = mysql_query("SELECT `id` FROM auth.account WHERE username='" . $username . "' && sha_pass_hash='" . $password . "' ");
                                    if (mysql_num_rows($doesExist) == 1) {
                                        setcookie('username', $username, time() + 60 * 60 * 24 * 365);
                                        setcookie('password', $password, time() + 60 * 60 * 24 * 365);
                                        header('Location: ' . $website);
                                    } else {
                                        echo 'Wrong Username / Password!';
                                    }
                                }
                            }
need help for an bridge that users login and /or register in WBB
 

kalle

high minded
VIP
Contributor
Joined
Oct 28, 2015
Messages
399
Reaction score
243
Points
118
Location
Bosnia and Herzegovina
Website
github.com
I dont understand you at all, but I would like to help you. Maybe I am noob, but what is WBB? And please be more specific with term 'bridge'. :D
 

BIOS

Knowledge Seeker
VIP
Joined
Oct 10, 2015
Messages
409
Reaction score
805
Points
168
Age
30
Location
Germany
with wbb i means woltlab burning board and a bridge isa modification to login and register with one login or register form
 

Jackbox

Active Member
Joined
Jan 2, 2016
Messages
171
Reaction score
88
Points
74
Age
25
I will take a look when I get home ;)
 

kalle

high minded
VIP
Contributor
Joined
Oct 28, 2015
Messages
399
Reaction score
243
Points
118
Location
Bosnia and Herzegovina
Website
github.com
And whats problem with that? Its easy to make switch signin/ up. Just add some javascript to switch between. But in forms add diffrent action taken, or if php is on same page just seperate post requests. I hope that I understand you very well :(
 

BIOS

Knowledge Seeker
VIP
Joined
Oct 10, 2015
Messages
409
Reaction score
805
Points
168
Age
30
Location
Germany
solved i will share it

Code:
//Attempt to make a bridge (Failed) -- Must try again.

                            $insert_account = mysql_query("INSERT INTO tigerforum_users (username,user_password, user_email,user_lang) VALUES ('$username','$password','$email')");
                           
// insert it on register form
 

Top