Hello login problem (PHP question)

* <?php
* session_start() ;
* $server = 'localhost';
* $user= 'root';
* $pass = '';
* $database = 'users';
* try{
* 	$conn = new PDO("mysql:host=$server;dbname=$database;", $user, $pass);
* } catch(PDOException $e){
* 	die("connection failed:" .$e->getmessage());
* }
* if(!empty($_POST['username']) && !empty($_POST['password'])):

* $records = $conn->prepare("SELECT * FROM table2 WHERE username = :username AND password = ':password'");

* $records->bindParam(':username', $_POST['username']);
* $records->bindparam(':password', $_POST['password']);
* $records->execute(
* array(
*     'username' => $_POST["username"],
* 	'password' => $_POST["password"]
* 	)
* 	);
* 	$count = $records=>rowcount();
* 	if($count > 0)
* 	{ echo "sucess";
* 		
* 	}
* 	//$results = $records->fetch(PDO::FETCH_ASSOC);
* ///if(count($results) > 0 && password_verify($_POST['password'],$results['password'])) {
* 	die('we have a login');

* 	
* }
* 	//else {
* 		
* 		///header("location:index3.php");
* 	



* //endif;

* ?>
* <html>


* <link rel="stylesheet" type="text/css" href="style.css">
* <link href="https://fonts.googleapis.com/css?family=Supermercado+One" rel="stylesheet">

* <form action="login.php" method="post" > 

* username <input type="text" placeholder="enter your username" name= "username" />
* password <input type="password" name= "password" />
* <input type="submit" />
* <form/>
* </html>

Hello im trying to create my own login page my signup page works great but login doesnt work
only get we failed message or fault message

I have modified your title and added ‘(PHP question)’ as your question is not related to FCC or our curriculum and gave the impression you were having trouble logging in to FCC. Someone will hopefully help you out. There are many members here who are knowledgeable in PHP (I am not).

what error you are getting?