000webhost

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");

Looks like you just need to finish it off.

that doesnt help cause i dont know php

That shows how to finish off the code. You stopped at prepare, you need to also execute and fetch the data now.

im so close i can output all usernames but i need it to output specific strings from the requested username

So what do you need to output and where is that data?

do you have discord so i can send you all the information?

Sponsor our Newsletter | Privacy Policy | Terms of Service