eduard Posted April 15, 2011 Share Posted April 15, 2011 How do I show a database on my website including the results of the form html? By a link to phpMyAdmin? And do I have to change the privileges of it, because now I have to write my username and password? Link to comment Share on other sites More sharing options...
Ingolme Posted April 15, 2011 Share Posted April 15, 2011 You don't need phpMyAdmin. All you need to do is use the mysql_query() function to retrieve data from the database and then print it out. Be sure to use mysql_fetch_assoc() to get the information from the query resource. Link to comment Share on other sites More sharing options...
eduard Posted April 15, 2011 Author Share Posted April 15, 2011 You don't need phpMyAdmin. All you need to do is use the mysql_query() function to retrieve data from the database and then print it out. Be sure to use mysql_fetch_assoc() to get the information from the query resource.Thanks! But it must be a html file including this php script?And I also have to design the database?Where do I find mysql_fetch_assoc() and is there an example of it? Link to comment Share on other sites More sharing options...
justsomeguy Posted April 15, 2011 Share Posted April 15, 2011 But it must be a html file including this php script?It must be a PHP script. You can have it output HTML if you want, but you don't need to.And I also have to design the database?You have to create the database and table before using them.Where do I find mysql_fetch_assoc() and is there an example of it? http://www.php.net/manual/en/function.mysql-fetch-assoc.phpThat page has an example showing what you want to do, along with links to other mysql functions and comments from other users. Link to comment Share on other sites More sharing options...
eduard Posted April 15, 2011 Author Share Posted April 15, 2011 It must be a PHP script. You can have it output HTML if you want, but you don't need to.You have to create the database and table before using them.http://www.php.net/manual/en/function.mysql-fetch-assoc.phpThat page has an example showing what you want to do, along with links to other mysql functions and comments from other users.Thanks! But can I use my current db (in phpMyAdmin) e. g. by exporting it? Link to comment Share on other sites More sharing options...
thescientist Posted April 15, 2011 Share Posted April 15, 2011 Thanks! But can I use my current db (in phpMyAdmin) e. g. by exporting it?no. you just use the database like you do INSERT, but instead you use SELECT to get data out instead of putting it in. get it straight, phpMyAdmin is only for managing the database using a UI (user interface. it's actually written in PHP and does all the SQL stuff just through mouse clicks instead). It's just another way to do it. For the interests of showing your database on a website though, you need to write PHP scripts that execute SQL statements, like we've been trying to teach you. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 15, 2011 Share Posted April 15, 2011 no. you just use the database like you do INSERT, but instead you use SELECT to get data out instead of putting it in.The "no" means you don't export the database. The database is not in phpMyAdmin, it is in MySQL. You use the database by connecting to MySQL and selecting the database to use, it doesn't have anything to do with phpMyAdmin. So yes, you use the same database, and no, you don't export it anywhere. Link to comment Share on other sites More sharing options...
eduard Posted April 15, 2011 Author Share Posted April 15, 2011 no. you just use the database like you do INSERT, but instead you use SELECT to get data out instead of putting it in. get it straight, phpMyAdmin is only for managing the database using a UI (user interface. it's actually written in PHP and does all the SQL stuff just through mouse clicks instead). It's just another way to do it. For the interests of showing your database on a website though, you need to write PHP scripts that execute SQL statements, like we've been trying to teach you.Ok, thanks! Link to comment Share on other sites More sharing options...
eduard Posted April 15, 2011 Author Share Posted April 15, 2011 The "no" means you don't export the database. The database is not in phpMyAdmin, it is in MySQL. You use the database by connecting to MySQL and selecting the database to use, it doesn't have anything to do with phpMyAdmin. So yes, you use the same database, and no, you don't export it anywhere.Thanks!After my website is finished, I think I throw the word ´database´ in the dust bin! Link to comment Share on other sites More sharing options...
thescientist Posted April 15, 2011 Share Posted April 15, 2011 why? Isn't that what you're trying to promote yourself as a developer of? :)you do realize this is only the absolute most tip of the iceberg, right? Link to comment Share on other sites More sharing options...
eduard Posted April 16, 2011 Author Share Posted April 16, 2011 why? Isn't that what you're trying to promote yourself as a developer of? :)you do realize this is only the absolute most tip of the iceberg, right?That´s what I think now, maybe I´ll love it (when the money comes!) Link to comment Share on other sites More sharing options...
eduard Posted April 16, 2011 Author Share Posted April 16, 2011 The "no" means you don't export the database. The database is not in phpMyAdmin, it is in MySQL. You use the database by connecting to MySQL and selecting the database to use, it doesn't have anything to do with phpMyAdmin. So yes, you use the same database, and no, you don't export it anywhere.So, I can use the db ´eduardli_company´(Can I copy this one to db ´company´?)? But instead the query INSERT I now must write a script SELECT? Link to comment Share on other sites More sharing options...
thescientist Posted April 16, 2011 Share Posted April 16, 2011 you should only really use one database. And then you just put data in (INSERT) or get data out (SELECT). Link to comment Share on other sites More sharing options...
eduard Posted April 16, 2011 Author Share Posted April 16, 2011 you should only really use one database. And then you just put data in (INSERT) or get data out (SELECT).Ok, thanks!Can I make a database on my computer and add a table to it with phpMyAdmin? Link to comment Share on other sites More sharing options...
thescientist Posted April 16, 2011 Share Posted April 16, 2011 Ok, thanks!Can I make a database on my computer and add a table to it with phpMyAdmin?uh yeah... it's what you've been doing. what's going on here...? Link to comment Share on other sites More sharing options...
dsonesuk Posted April 16, 2011 Share Posted April 16, 2011 ???? Is he talking about exporting database and tables from his local server, to his website server, using phpmyadmin? Link to comment Share on other sites More sharing options...
eduard Posted April 16, 2011 Author Share Posted April 16, 2011 ???? Is he talking about exporting database and tables from his local server, to his website server, using phpmyadmin?You are too late! That was much earlier! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.