This may sound a bit confusing so I'll use an example.

Say I want to make a book-review website using PHP, and I want to write lots of book reviews. Instead of creating a page for every book, which could mean hundreds and hundreds, is there a way you can do this with mySQL and if so, how?

I would prefer to maybe fill out a form on a website with the 'book-review' which would enter the data into the database, and then you will be able to access this 'book-review' using a URL (in your website template of course)

Please reply and help me

    That's the exact premise behind using PHP and MySQL to create data-driven websites...

    Instead of creating a book review web page and calling each review in a separate page like this:
    http://whatever.com/thisbook/review1.php
    http://whatever.com/thisbook/review2.php
    http://whatever.com/thisbook/review3.php

    You may do something like:
    http://whatever.com/review.php?bookid=1&reviewid=1
    http://whatever.com/review.php?bookid=1&reviewid=2
    http://whatever.com/review.php?bookid=1&reviewid=3

    Where the bookid value of 1 may correspond to the "thisbook" book in your database books table, and the separate reviewid values represent different reviews for that book. (Of course the links themselves are generated on the fly from values extracted from the tables as well.)

    The bottom line is this... To do what you want is rather simple, if you know what you are doing. If you don't know what you are doing, I recommend a trip to your local book store to purchase a book to learn how to use PHP and MySQL to create data-driven sites.

      nice 😃 thats exactly what im talking about

      you wouldn't by any chance have the code that enables the URL to read from the database would ya.

      as you can tell im still a begginer at this so it would be much appreciated, and yes i'm planning to learn it all in the summer!

      thanks alot for replying mate!

        Well I´m trying to make a mental structure of a close idea of what you´re trying to develop.

        I have some experience about MySQL and PHP (university final proyect!) but I´m thinking about the best way to do so.

        Shall we trade ideas?

        And also... trade ebooks? A good way to save some money! By the way, start learning about building a php database, and I have some good websites about php and databases but they are in spanish😃....enjoy!

        http://www.desarrolloweb.com
        (there is one...)

        See ya

        Excramasax

          Take a look through the snippet library here on phpbuilder, it''s got lots of examples of reading / writing from /t o a database.

            The snippet library is here.

            Like I said before, get a book. These are basic principles of PHP and MySQL. Don't try to run before you learn to walk. You really need to learn the very basics (like echoing variables, defining variables, etc... before you worry about trying to read and write from a DB. (No offense, but I don't have time to write this script for you (especially when the code is smattered throughout a bunch of books, and throughout this site, and others on the 'Net.

              Write a Reply...