Really New to PHP and MYSQL learning from youtube videos but am lost to where i went wrong
Worked fine before buy i tried adding in a search bar and now i get Parse error: syntax error, unexpected 'username' (T_STRING) in C:\xampp\htdocs\Registration\index.php on line 25 Anyways Heres The Code <?php mysql_connect("localhost","root","password") or die("could not connect"); mysql_select_db("registration") or die("could not find db"); $output = ''; //collect if(isset($_POST['search'])) { $searchq = $_POST['search']; $query = mysql_query("SELECT * FROM anime WHERE Title '%$searchq%'") or die("Could not search!"); $count = mysql_num_rows($query); if($count == 0){ $output = 'There was no search results!'; }else{ while($row = mysql_fetch_array($query)) { $title = $row['firstname']; $output .= '<div>'.$title.'</div>; } session_start(); if (!isset($_SESSION['username'])) { $_SESSION['msg'] = "You must log in first"; header('location: login.php'); } if (isset($_GET['logout'])) { session_destroy(); unset($_SESSION['username']); header("location: login.php"); } ?> <!DOCTYPE html> <html> <head> <title>Home</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <form action="index.php" method="post"> <input type="text" name="search" placeholder="search..."/> <input type="submit" value=">>" /> </form> <?php print("$output");?> <div id="nav"> <div> </div> </div> <div id="content"> <div id="feed"> </div> <div id="temp"> </div> </div> </div> <div class="content"> <!-- notification message --> <?php if (isset($_SESSION['success'])) : ?> <div class="error success" > <h3> <?php echo $_SESSION['success']; unset($_SESSION['success']); ?> </h3> </div> <?php endif ?> <!-- logged in user