me102 Posted July 20, 2007 Share Posted July 20, 2007 How would I get a setting from mysql using this $settings['title'] Link to comment https://forums.phpfreaks.com/topic/60887-settings/ Share on other sites More sharing options...
benjaminbeazy Posted July 20, 2007 Share Posted July 20, 2007 $sql = "SELECT * FROM whatever"; $result = mysql_query($sql) or die(mysql_error()); $settings = mysql_fetch_array($result); echo "title = $settings['title']"; see http://www.tizag.com/mysqlTutorial/mysqlselect.php Link to comment https://forums.phpfreaks.com/topic/60887-settings/#findComment-302981 Share on other sites More sharing options...
me102 Posted July 20, 2007 Author Share Posted July 20, 2007 Now how would I make that a global setting? Link to comment https://forums.phpfreaks.com/topic/60887-settings/#findComment-302988 Share on other sites More sharing options...
benjaminbeazy Posted July 20, 2007 Share Posted July 20, 2007 global setting for what????? Link to comment https://forums.phpfreaks.com/topic/60887-settings/#findComment-302989 Share on other sites More sharing options...
me102 Posted July 20, 2007 Author Share Posted July 20, 2007 Nvm I got it thank you. Link to comment https://forums.phpfreaks.com/topic/60887-settings/#findComment-302997 Share on other sites More sharing options...
me102 Posted July 20, 2007 Author Share Posted July 20, 2007 Ok heres what I want to do, I have a mysql table called settings which has 3 fields id, name, value I want to use $settings['title'] to get the row named title and out put the value. Link to comment https://forums.phpfreaks.com/topic/60887-settings/#findComment-303013 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.