Hello!
I have a problem that should be easy, but I can’t solve it. I’m grateful if someone can help me, and i can pay a fee or donate something to thank for getting the info.
<?php global $wpdb;$result = $wpdb->get_var(“SELECT occupation FROM datatable WHERE name=’RIHANNA'”);echo $result;?>
→ this code gives me the text of the occupation “singer”
The question is: How to avoid writing the text “RIHANNA” but make the code read the text from the current page title? So I’ll be able to create pages titling “RIHANNA”, “JIM CARREY”, “KANE” and get back the strings of their occupations (“singer”,”actor”,”wrestler”) pasting the same code on the pages. Thanks a lot