flashx Posted November 8, 2010 Share Posted November 8, 2010 Hi guys, im needing to grab information out of a mysql database field called "clientname" thats inside a table called "clients" how do i retrieve the clients name in html and display it? heres what i have so far, am just needing the code to retrieve... $host = localhost; $dbuser = user; $dbpass = pass; $dbname = mydb; $connection = mysql_connect($host, $dbuser, $dbpass); $db = mysql_select_db($dbname, $connection); // code to retrieve a particular clients details Cheers, Quote Link to comment https://forums.phpfreaks.com/topic/218099-stupid-question-from-a-newbie/ Share on other sites More sharing options...
grlayouts Posted November 8, 2010 Share Posted November 8, 2010 $client = mysql_fetch_array(mysql_query("select * from clients'")); print"$client[name]"; That would display if you had a field called name in the clients table. edit as appropriate. Quote Link to comment https://forums.phpfreaks.com/topic/218099-stupid-question-from-a-newbie/#findComment-1131735 Share on other sites More sharing options...
flashx Posted November 8, 2010 Author Share Posted November 8, 2010 Hi grlayouts, thanks for your reply. that seems to work, thanks heaps Cheers Quote Link to comment https://forums.phpfreaks.com/topic/218099-stupid-question-from-a-newbie/#findComment-1131746 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.