0

Hello.

I created a simple registeration code for my form but I seem to get this error.

Parse error: syntax error, unexpected T_IF on line 130.

I tried to change everything, double check it. But still I get the same error.

 if ($_POST['loginbtn']){
            $user = $_POST['user'];
            $password = $_POST['password'];
    }
    else
        echo $form;

On line 130:

if ($_POST['loginbtn']){

That's it. I still can't find the error.

Thanks.

3
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by MrXortex
0
                    <?php

                    $form = "<form action='login.php' method='post'>
                        <table>
                        <tr>
                            <td><label for='username'><strong>Username&nbsp;</strong></br><input type='text' name='user' id='username' value='' size='30' placeholder='Enter Username' /></label></td>
                        </tr>
                        <tr>
                        <td><label>&nbsp;</label></td>
                        </tr>
                        <tr>
                            <td><label for='password'><strong>Password&nbsp;</strong></br><input type='password' name='password' id='password' size='30' placeholder='Enter Password'/></label></td>
                        </tr>
                        <tr>
                        </tr>
                        <tr>
                        <td><label>&nbsp;</label></td>
                        </tr>
                        <tr>
                        <tr>
                    <td><input type='submit' class='submit' name='loginbtn' value='&nbsp; Login &nbsp;' />&nbsp; or &nbsp; <input type='submit' class='submit' name='loginbtn' value='Register Now' /></strong></td>
                    </tr>
                    </table>
                    </div>
                </form>"



if ($_POST['loginbtn']){
            $user = $_POST['user'];
            $password = $_POST['password'];
    }
    else
        echo $form;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.