I am making an article management system for my CMS, however, it keeps adding extra lines, when I access the admin panel (extra <hr>) Is there a way I can stop this.
<?PHP ////////////////// $user ="admin"; $pass ="Crack-This"; ////////////////// $self = $_SERVER[’PHP_SELF’]; $usern = $_POST['user']; $passw = $_POST['pass']; $pub = $_POST['pub']; $link = $_POST['link']; $des = $_POST['des']; //////////////////// echo "<form action='$self' method='post'><br>"; $final = "<br> Public Name: <input name='pub' type='text' value='what the public views'> <br> Link location: <input name='link'type='text' value='http://somesite.com'> <br> Description: <input name='des' type='text' value='something that does some stuff'> <br> <input type='submit' value='Add link'> "; ////////////////// $login = " <br> <input name='user' type='text' value='Username'> <br> <input name='pass' type='password' value='Password'> <br> <input type='submit' value='Login'> "; if($user == $usern && $pass == $passw){ echo "$final"; }else{ echo "$login"; } /////////////////// $string = "<hr><a href=$link>$pub</a> - $des <hr><br>"; $file = "files.txt"; $fh = fopen($file, "a") or die("can't open records"); fwrite($fh, "$string"); fclose($fh); ?>