I am using 000webhost which I have a database and I would like the php to return account information
Example:
000webhost.com/accountcheck.php?username=USERNAME
then from here it will return the Username, Plan and expiry date
All I have so far is the connection to the database
and in the database, it’s ‘username’, ‘plan’ and ‘expirdate’
what i have so far:
<?php
$un = $_GET['username'];
//Initialize Connection
$sername = "SERVER";
$uname = "USERNAME";
$pword = "PASSWORD";
$dbname = "DBNAME";
try {
$conn = new PDO("mysql:host=$sername;dbname=$dbname", $uname, $pword);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$query = $conn->prepare("SELECT * FROM account WHERE `username` = :USN AND `password` = :PAW");