The overall goal is to relay information from a mysql server via a php file to the webpage being viewed. More specifically I want to target certain aspects of the php file, or certain tables in the database, and display them in different divs on the webpage. Given my limited experience I'm not sure how best to do this but I would imagine the flow would be something like this...
(I apologize for the limited code detail but everything I tried didn't seem like the right approach so I'll keep it broad so it can be open to suggestions.)
Call php file and request certain variables such as:
$(document).ready(function(){
//call sqlrelay.php
//ask for some variable ($row) or some section of the code (within the if statement)
//display it in div ('#collapseOne')
};
Listen with the php file (sqlrelay.php) such as:
<?php
//if request received from client side do this:
include ("connection.php");
$sendtable = "SELECT timein FROM timestamp1 ORDER BY id DESC LIMIT 1";
$result=mysqli_query($link, $sendtable);
$row = mysqli_fetch_array($result);
$table = $row['timein'];
echo $table;
<?