so this is my code but it gives an unexpected '{' on line 50, can someone just double check this for me? The box on my site just disappears and I have run this through a few phrases and they picked an unexpected '{' on line 31 as well.
I'm not sure if I'm just not seeing it but id appreciate the help
CODE
<?php
if(isset($_POST['signup'])){
$screenName = $_POST['screenName'];
$password = $_POST['password'];
$email = $_POST['email'];
$error = '';
if(empty($screenName) or empty($password) or empty($email)){
$error = 'All fields are required!';
}else{
$email = $getFromU->checkInput($email);
$screenName = $getFromU->checkInput($screenName);
$password = $getFromU->checkInput($password);
if(!filter_var($email)){
$error = 'Invalid email format';
}else if(strlen($screenName) > 20){
$error = 'Name must be between 6-20 caracters long';
}else if(strlen($password) < 5){
$error = 'Password is too short';
}else{
if($getFromU->checkEmail($email) === true){
$error = 'Email already in use';
}else{
}
}
}
}
?>
<form method="post">
<div class="signup-div">
<h3>Sign up </h3>
<ul>
<li>
<input type="text" name="screenName" placeholder="Full Name"/>
</li>
<li>
<input type="email" name="email" placeholder="Email"/>
</li>
<li>
<input type="password" name="password" placeholder="Password"/>
</li>
<li>
<input type="submit" name="signup" Value="Signup for SocialBud">
</li>
</ul>
<?php
if(isset($error){
echo '<li class="error-li">
<div class="span-fp-error">'.$error.'</div>
</li>';
}
?>
</div>
</form>