me102 Posted July 20, 2007 Share Posted July 20, 2007 How would I get a setting from mysql using this $settings['title'] Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
benjaminbeazy Posted July 20, 2007 Share Posted July 20, 2007 global setting for what????? Quote Link to comment Share on other sites More sharing options...
me102 Posted July 20, 2007 Author Share Posted July 20, 2007 Nvm I got it thank you. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.