eduard Posted February 22, 2011 Share Posted February 22, 2011 Can I export a database (phpMyadmin) to a html document (for my website)? Link to comment Share on other sites More sharing options...
Ingolme Posted February 22, 2011 Share Posted February 22, 2011 There doesn't seem to be an option like that in my version of phpMyAdmin.These are the available formats: CodeGen CSV CSV for MS Excel data Microsoft Word 2000 LaTeX MediaWiki Table Open Document Spreadsheet Open Document Text PDF PHP array SQL Texy! Text Excel 97-2003 XLS Workbook Excel 2007 XLSX Workbook YAML You can always make a PHP application write the HTML tables for you, which is the point of databases.Or you can just look through your own database and code the HTML tables manually, which would be a long and tedious job. Link to comment Share on other sites More sharing options...
thescientist Posted February 22, 2011 Share Posted February 22, 2011 Can I export a database (phpMyadmin) to a html document (for my website)?not in the way that you want it to. this has already been brought up and discussed in another one of your threads, and links and advice have been dispensed on how one gets information out a database and outputs it as HTML to be viewed in a webpage. Link to comment Share on other sites More sharing options...
eduard Posted February 22, 2011 Author Share Posted February 22, 2011 There doesn't seem to be an option like that in my version of phpMyAdmin.These are the available formats: CodeGen CSV CSV for MS Excel data Microsoft Word 2000 LaTeX MediaWiki Table Open Document Spreadsheet Open Document Text PDF PHP array SQL Texy! Text Excel 97-2003 XLS Workbook Excel 2007 XLSX Workbook YAML You can always make a PHP application write the HTML tables for you, which is the point of databases.Or you can just look through your own database and code the HTML tables manually, which would be a long and tedious job. I have the same options! So, to solve this problem html tables have the same functions as php tables? Link to comment Share on other sites More sharing options...
boen_robot Posted February 22, 2011 Share Posted February 22, 2011 I have the same options! So, to solve this problem html tables have the same functions as php tables?There's no such thing as "php tables".PHP can output anything, including HTML. This HTML can contain anything, including HTML tables.So, you could use PHP to connect to the database, and output HTML that contains HTML table(s) based on the contents of the database. That's what phpMyAdmin does.The point of you making an application is to use PHP to output something else based on the contents of the database. Link to comment Share on other sites More sharing options...
eduard Posted February 22, 2011 Author Share Posted February 22, 2011 not in the way that you want it to. this has already been brought up and discussed in another one of your threads, and links and advice have been dispensed on how one gets information out a database and outputs it as HTML to be viewed in a webpage.Ok, thanks! But does this mean it´s possible? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 22, 2011 Share Posted February 22, 2011 It is possible to display information from a database on a web page. In fact, that's the point. Link to comment Share on other sites More sharing options...
thescientist Posted February 22, 2011 Share Posted February 22, 2011 Ok, thanks! But does this mean it´s possible?YES!!!!!!!!!!!!!!!!!!!!!!!look it up! read your f'in threads. We've already gone over this! Link to comment Share on other sites More sharing options...
eduard Posted February 22, 2011 Author Share Posted February 22, 2011 It is possible to display information from a database on a web page. In fact, that's the point.That´s the answer I needed! I´ll do it! Link to comment Share on other sites More sharing options...
eduard Posted February 22, 2011 Author Share Posted February 22, 2011 YES!!!!!!!!!!!!!!!!!!!!!!!look it up! read your f'in threads. We've already gone over this! Thanks! I knew it is in a topic but I didn´t know where! Link to comment Share on other sites More sharing options...
eduard Posted February 22, 2011 Author Share Posted February 22, 2011 There's no such thing as "php tables".PHP can output anything, including HTML. This HTML can contain anything, including HTML tables.So, you could use PHP to connect to the database, and output HTML that contains HTML table(s) based on the contents of the database. That's what phpMyAdmin does.The point of you making an application is to use PHP to output something else based on the contents of the database.Ok, many thanks! Link to comment Share on other sites More sharing options...
thescientist Posted February 22, 2011 Share Posted February 22, 2011 Thanks! I knew it is in a topic but I didn´t know where!it's also in the tutorials, if you search on google, etc. Or if you just read your topics more thoroughly, you'd have all the answers you needed weeks ago. Link to comment Share on other sites More sharing options...
eduard Posted February 23, 2011 Author Share Posted February 23, 2011 There's no such thing as "php tables".PHP can output anything, including HTML. This HTML can contain anything, including HTML tables.So, you could use PHP to connect to the database, and output HTML that contains HTML table(s) based on the contents of the database. That's what phpMyAdmin does.The point of you making an application is to use PHP to output something else based on the contents of the database.This: ´The point of you making an application is to use PHP to output something else based on the contents of the database´ is what I want to do!Can you be more specific, please? Link to comment Share on other sites More sharing options...
Ingolme Posted February 23, 2011 Share Posted February 23, 2011 This: ´The point of you making an application is to use PHP to output something else based on the contents of the database´ is what I want to do!Can you be more specific, please?In that case, you'll have to learn PHP. http://w3schools.com/php/ Link to comment Share on other sites More sharing options...
Fmdpa Posted February 23, 2011 Share Posted February 23, 2011 Eduard, do you really understand what PHPMyAdmin is? You've been talking a lot about it in your recent posts. PHPMyAdmin is not the database. It is merely a web application (written in PHP) that displays the data in your database. It is not your database, though. MySQL is your database server. It holds your databases and tables. With PHPMyAdmin, you can view, edit and delete data (as well as other things). However, there is more to databases than PHPMyAdmin. Through PHP, you can fetch certain data and display it on web pages however you want. You can display it in HTML tables (like PMA) or in lists, or literally thousands of other ways. Taking the example from this page, here's how you could display a list of your customers' first and last names from the "Customers" table (shown on that page). <?php$con = mysql_connect('localhost','root','password'); //your MySQL login credentialsmysql_select_db('my_database_name', $con);$result = mysql_query('SELECT FirstName, LastName FROM Customers');$output = '<ul>'; //begin output with an opening <ul> tag to begin the listwhile ($row = mysql_fetch_array($result)) { // loop through all of the results from the database $output .= '<li>' . $row['LastName'] . ', ' . $row['FirstName'] . '</li>'; //append each result row to the list}$output .= '</ul>'; //close list?><html><head> <title>Customer List</title></head><body> <?php echo $output; ?></body></html> PHP would output something like this: Hansen, Ola Svendson, Tove Pettersen, Kari Does that help? Link to comment Share on other sites More sharing options...
eduard Posted February 23, 2011 Author Share Posted February 23, 2011 Eduard, do you really understand what PHPMyAdmin is? You've been talking a lot about it in your recent posts. PHPMyAdmin is not the database. It is merely a web application (written in PHP) that displays the data in your database. It is not your database, though. MySQL is your database server. It holds your databases and tables. With PHPMyAdmin, you can view, edit and delete data (as well as other things). However, there is more to databases than PHPMyAdmin. Through PHP, you can fetch certain data and display it on web pages however you want. You can display it in HTML tables (like PMA) or in lists, or literally thousands of other ways. Taking the example from this page, here's how you could display a list of your customers' first and last names from the "Customers" table (shown on that page). <?php$con = mysql_connect('localhost','root','password'); //your MySQL login credentialsmysql_select_db('my_database_name', $con);$result = mysql_query('SELECT FirstName, LastName FROM Customers');$output = '<ul>'; //begin output with an opening <ul> tag to begin the listwhile ($row = mysql_fetch_array($result)) { // loop through all of the results from the database $output .= '<li>' . $row['LastName'] . ', ' . $row['FirstName'] . '</li>'; //append each result row to the list}$output .= '</ul>'; //close list?><html><head> <title>Customer List</title></head><body> <?php echo $output; ?></body></html> PHP would output something like this: Hansen, Ola Svendson, Tove Pettersen, Kari Does that help? Many thanks!This is exactly what I want to show on my website (lists of data!). First, I am going to search for a good (atractive?) image of a database, howit works and what you can do with it (Google)!However, I don´t understand PMA? Link to comment Share on other sites More sharing options...
thescientist Posted February 23, 2011 Share Posted February 23, 2011 PMA = phpMyAdmineverything that fdmpa just told you is covered in the tutorials, which we referenced for you before, and that you allegedly claimed to have read. http://www.w3schools.com/php/php_mysql_select.aspI'm not sure what this database "image" is that you keep referring to. Link to comment Share on other sites More sharing options...
eduard Posted February 23, 2011 Author Share Posted February 23, 2011 PMA = phpMyAdmineverything that fdmpa just told you is covered in the tutorials, which we referenced for you before, and that you allegedly claimed to have read. http://www.w3schools.com/php/php_mysql_select.aspI'm not sure what this database "image" is that you keep referring to.Ok, thanks!(the image-I already have it-, you will see when it is on my website!) Link to comment Share on other sites More sharing options...
Ingolme Posted February 23, 2011 Share Posted February 23, 2011 PMA = phpMyAdmineverything that fdmpa just told you is covered in the tutorials, which we referenced for you before, and that you allegedly claimed to have read. http://www.w3schools.com/php/php_mysql_select.aspI'm not sure what this database "image" is that you keep referring to.I believe he's referring to an actual picture that explains what a database is. Link to comment Share on other sites More sharing options...
eduard Posted March 8, 2011 Author Share Posted March 8, 2011 Eduard, do you really understand what PHPMyAdmin is? You've been talking a lot about it in your recent posts. PHPMyAdmin is not the database. It is merely a web application (written in PHP) that displays the data in your database. It is not your database, though. MySQL is your database server. It holds your databases and tables. With PHPMyAdmin, you can view, edit and delete data (as well as other things). However, there is more to databases than PHPMyAdmin. Through PHP, you can fetch certain data and display it on web pages however you want. You can display it in HTML tables (like PMA) or in lists, or literally thousands of other ways. Taking the example from this page, here's how you could display a list of your customers' first and last names from the "Customers" table (shown on that page). <?php$con = mysql_connect('localhost','root','password'); //your MySQL login credentialsmysql_select_db('my_database_name', $con);$result = mysql_query('SELECT FirstName, LastName FROM Customers');$output = '<ul>'; //begin output with an opening <ul> tag to begin the listwhile ($row = mysql_fetch_array($result)) { // loop through all of the results from the database $output .= '<li>' . $row['LastName'] . ', ' . $row['FirstName'] . '</li>'; //append each result row to the list}$output .= '</ul>'; //close list?><html><head> <title>Customer List</title></head><body> <?php echo $output; ?></body></html> PHP would output something like this: Hansen, Ola Svendson, Tove Pettersen, Kari Does that help? Where do I have to save this document? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 8, 2011 Share Posted March 8, 2011 You can save it anywhere in your web server's root directory. Link to comment Share on other sites More sharing options...
eduard Posted March 8, 2011 Author Share Posted March 8, 2011 You can save it anywhere in your web server's root directory.I did that! So, only I like to know is there an error in this html document? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 8, 2011 Share Posted March 8, 2011 If you run it and see an error message, then yes, there's an error. Link to comment Share on other sites More sharing options...
Fmdpa Posted March 8, 2011 Share Posted March 8, 2011 The example I gave can be put in any file on your web server, as long as the file ends in .php.Also, make sure the mysql_connect credentials are correct for your database. Link to comment Share on other sites More sharing options...
thescientist Posted March 8, 2011 Share Posted March 8, 2011 and you have the relevant table and matching fields in the DB... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.