Error with syntax - return URL

0

Hello, people

I'm having a new problem, I'm trying to identify the syntax error below for a couple of hours:

Code:

<?php

session_start();

@$usuario = $_SESSION["usuario"];
@$senha = $_SESSION["senha"];

if(isset($usuario) && isset($senha)){

    header("Location: cp_admin.php");
}

?>

<body>
    <main>
        <div id="login">

            <?php 

            if(isset($_GET["url"])){

                $url = $_GET["url"];

            }

            ?>

            <form action="acoes/user-login.php?url=<?php echo $url; ?>" method="POST"> 

            <?php } else { ?>
                <form action="acoes/user-login.php" method="POST"> 
            <?php } ?>    

                Usúario <input type="text" name="user-name" id="user-name" placeholder="USÚARIO" /> 
                Senha <input type="password" name="user-pass" id="user-pass" placeholder="SENHA" />
                <input type="submit" name="user-login" id="user-login" value="Entrar" />
            </form>
        </div>

        <div class="content-logo-2"><img src="../img/android-icon-36x36.png"></div>
        <div id="content-logo"> <!--<img src="../img/logo_180.png"> --></div>
    </main>

The problem is that when I try to access the page to check if the code is working (I know it is not), it returns me the following error:

"Parse error: syntax error, unexpected '}' in C: \ Program Files (x86) \ EasyPHP-Devserver-16.1 \ eds-www \

line 74 has the following codes:

I wonder what error I'm making

I'm waiting for you

    
asked by anonymous 23.01.2017 / 07:04

1 answer

2

the code:

<?php
if(isset($_GET["url"])){
    $url = $_GET["url"];
}
?>

Try to remove the last brackets } , it is where the error is found:)

    
23.01.2017 / 07:17