DBDevOne
asked on
Get data from MySQL to fill in data in a webpage
Hello. I am going to create a webpage that gets data from a MySQL table on a Linux server to populate a table in a webpage.
How would I go about doing that?
How would I go about doing that?
First What scripting language is your page in?
ASKER
The language doesn't matter. I'm open for suggestions.
php is the most widely used scripting language on the linux platform for creating dynamic webpage. It is really straightforward as well. It is also platform independant, therefore you can even make it work on windows.
Check out http://www.php.net
Check out http://www.php.net
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello
One more thing in concern with my previous post ....
I have not included any HTML formatiing in my script.
The script will print only first column on the browserand accordingly you are requested to do formatting.
Thank You
-Jankit
One more thing in concern with my previous post ....
I have not included any HTML formatiing in my script.
The script will print only first column on the browserand accordingly you are requested to do formatting.
Thank You
-Jankit
This example is a php example ( with mysql ).
This is a bit shorter and perfect for writing your first databasedriven script ( in the future it is beter to exclude the first part and put in an other file , so it is better to make updates f.e. username , otherwis you have to change it on each page - for this use include)
$hostname_db = "server";
$database_db = "databasename";
$username_db = "username";
$password_db = "pwd1";
$db = mysql_pconnect($hostname_d b, $username_db, $password_db) or trigger_error(mysql_error( ),E_USER_E RROR);
mysql_select_db($database_ db, $db);
$query_producten = "SELECT * FROM producten ";
$producten = mysql_query($query_product en, $db) or die(mysql_error());
$row_producten = mysql_fetch_assoc($product en);
do{
echo($row_producten['field ']);
} while ($row_producten = mysql_fetch_assoc($product en));
Greetz Ultimat
This is a bit shorter and perfect for writing your first databasedriven script ( in the future it is beter to exclude the first part and put in an other file , so it is better to make updates f.e. username , otherwis you have to change it on each page - for this use include)
$hostname_db = "server";
$database_db = "databasename";
$username_db = "username";
$password_db = "pwd1";
$db = mysql_pconnect($hostname_d
mysql_select_db($database_
$query_producten = "SELECT * FROM producten ";
$producten = mysql_query($query_product
$row_producten = mysql_fetch_assoc($product
do{
echo($row_producten['field
} while ($row_producten = mysql_fetch_assoc($product
Greetz Ultimat
ASKER
Thank you very much Jankit and thank you all for the comments. I appreciate it!