So I have an html element where the text reflects a text field in my database, this works normally. I need it to update every so often so I have:
Which just grabs the echo from load_marque.php.
Inside of load_marque.php I simply have:
$Text = “Test Text”;
It works fine. And if I change the text in $Text then update, it also update in the html element.
But when I then try to pull from my database within load_marque.php it seems to break for some reason.
$marque_text = $wpdb->get_row ( “SELECT * FROM marque_text WHERE ID = ‘1’ “, OBJECT );
$Text = $marque_text->Text;
The html element text is blank.
I’ve been banging my head trying to figure this out. Can I NOT access my database using an outside php script?
Read more here:: Fetching wpdb data from a php file seems to break?