I looked through the suggested other posts though I didn't see what I was looking for. This may seem basic to most of you here, so please forgive my simplicity, but I'm stuck. So below is what I have and it's working. (not everything is showing of the page). What I want to do is call the "payment_status" from a different database completely. What my question is, is how can I use this, and then have another script within this just to pull that column from a different database. I'm using PHP.
What I have
<?php
$servername = " ";
$username = " ";
$password = " ";
$dbname = " ";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT id, name, email, payment_status, FROM paymenttable";
$result = $conn->query($sql);
echo "<div id='firstentry" . $row["id"]. "'><font color='yellow'>Name:</font> <span class='name'>" . $row["name"]. "</span> <br>"; // This uses the first database listed
echo "<font color='yellow'>Payment Status:</font> <span class='payment_status'>" . $row["payment_status"]. "</span>"; // This is what needs called from a different database than the rest of the page
echo "<div id='next entry" . $row["id"]. "'><font color='yellow'>Email:</font> <span class='email'>" . $row["email"]. "</span> <br>"; // This uses the first database listed