Why do I get an error with br /? [closed]

1
session_start();

<br /> //esta es la linea 5
<form method="post" action="?">
<table border="1" cellspacing="0" cellpadding="5" align="center" >
<tr>
<td>Ingrese su nombre de usuario</td>
<td><input type="text" name="frmUsername"></td>
</tr>
<tr>
<td>Ingrese su contraseña</td>
<td><input type="password" name="frmPassword"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Enviar datos"></td>
</tr>
</table>
</form>
  

Parse error: syntax error, unexpected '<' in
  : \ xampp \ htdocs \ Curso_Users \ user.php on line 5

    
asked by M.Martin 19.10.2018 в 19:08
source

2 answers

3

I think it's the error that mentions @Gustavo Cantero. You are waiting for the closing tag of PHP before '<' pertaining to <br> It should look like this:

session_start();
?>
<br /> //esta es la linea 5
<form method="post" action="?">
<table border="1" cellspacing="0" cellpadding="5" align="center" >
<tr>
<td>Ingrese su nombre de usuario</td>
<td><input type="text" name="frmUsername"></td>
</tr>
<tr>
<td>Ingrese su contraseña</td>
<td><input type="password" name="frmPassword"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Enviar datos"></td>
</tr>
</table>
</form>
    
answered by 19.10.2018 в 19:24
3

Before br you should close the PHP tag with? > that is, it should look like this:

session_start(); ?>

Greetings.

    
answered by 19.10.2018 в 19:18