I am doing this assignment i have to redirect the login page to the welcome back page to authenticate the use identity but i am getting this error in the welcome_back page in page. i have look everywhere to find the error. the error is the

and now here is my code for it.

        <div id="contentArea">
            <?php
                    session_start();
                    if(!session_is_registered("username"))
                    {
                        header("location:login_user.php")
                    } <--the error is right here
                     Parse error: syntax error, unexpected '}' in C:\wamp64\www\Taylor_Luana_ITEC244_Assignment\php\welcome_back.php on line 43
            ?>
            <?php
                    echo "Welcome back " . $_SESSION['username'];
            ?>

            <div id="footerbox">

                    <div id="footerholder">
                        <div id="">

                            <a href="browsenationalwonders.php">Browse National Wonders</a>
                            <a href="updateprofile.php">Update Profile</a>
                            <a href="postnaturalwonder.php">Post Natural Wonders</a>
                            <a href="logout.php">Logout</a>

                        </div>

                    </div>
            </div>
        </div>

    </body>

</html>

Recommended Answers

All 3 Replies

You don't have a semi-colon after header("location:login_user.php")

It should be header("location:login_user.php");

It says the } is unexpected because it sees a } immediately after that line without a semi-colon first.

thank you very much dani

Are you getting any more errors? If not, can you please mark this question solved. Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.