Trying to make a website that uses php and mysqli. I'm trying to have a page select values from a database. For example it would select the site name, site heading, and maybe contact info from the database. I have everything on a .php file now but want to move it to a database so I can make changes from one page on an admin panel. Here is some info I'm using now. I think Wordpress does kinda the same thing just not 100% how to make it work well.
table = web_opt
columns = opt_name, opt_value, opt_easy_name
For example, I would have an entry as opt_name = NAME_LONG, opt_value = Example Business Co., opt_easy_name = Business Name
On the web page I would do something like <?php echo ['opt_value'] WHERE opt_name = NAME_LONG; ?>
On the page I would just change the opt_name portion. I know this code is not correct but any thoughts on how I can access something like this? Thanks for any help!
It seems you need to take a look at something like phpMyAdmin for creating the database and tables you need - most hosts provide you with a MySQL frontend or can install one - though you can, of course, do this directly with PHP too but you will undoubtedly find it easier with a GUI.
Once you have some sort of schema setup you will then need to look into PHP's MySQLi or MySQL PDO for handling your data and make use of the MySQL Reference Manual.