Jump to content

Showing results of the form in database on my website?


eduard
 Share

Recommended Posts

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

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

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? Edited by eduardchile
Link to comment
Share on other sites

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

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

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. Edited by thescientist
Link to comment
Share on other sites

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

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

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! Edited by eduardchile
Link to comment
Share on other sites

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?

Edited by thescientist
Link to comment
Share on other sites

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!) :) Edited by eduardchile
Link to comment
Share on other sites

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

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? Edited by eduardchile
Link to comment
Share on other sites

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

???? 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...