Forum Moderators: coopster

Message Too Old, No Replies

php making new pages?

         

bobnew32

8:07 pm on Apr 29, 2003 (gmt 0)

10+ Year Member



Well for my site I plan to use php and mysql to design my site. I have an outline where I can input information for a certain tv show (when its on, a bio, its name...etc). I have a template created for where the info is to go, and I want each show to have its own page, but do those pages really exist or when you enter a certain address in the address bar of your browser it makes that page?

This has been confusing me a while, can somone explain the concept I am trying to explain? Thx

daisho

8:14 pm on Apr 29, 2003 (gmt 0)

10+ Year Member



All the files will most likely not exist. You will most likely have one file maybe called "show.php" which will be passed parameters. Based on the parameters you query the database and spit out a result page to the client.

daisho

bobnew32

8:19 pm on Apr 29, 2003 (gmt 0)

10+ Year Member



Woah thats kind of deep, I havent gone that far down the rabbit whole yet :p. Can you give me an example, url, tutorial? Thx alot

Birdman

8:25 pm on Apr 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This thread touches on some ideas:

A dynamic site in 2 minutes
no special skills required
[webmasterworld.com]

dmorison

8:31 pm on Apr 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi bobnew32,

There are plenty of great step-by-step tutorials on the Web regarding building a dynamic site with PHP and MySQL.

I would recommend doing a Google search for:

"building dynamic websites with PHP and MySQL"

This search will return plenty of bed time reading!

The basics, as daisho as pointed out are:

- The user (client) will request a page having provided some input - either via a Form (submitted using POST), or directly via the URL (submitted using GET - which means the link could be from another page or even another website)

- Your server then processes the page using PHP, which, using the input received (either by GET or by POST) can make a query to your database or access other resources to find the information required.

- Your server then builds up a brand new HTML every time by using the information retrieved from the database - and sends it back to the user (client)!

Happy coding!

bobnew32

8:42 pm on Apr 29, 2003 (gmt 0)

10+ Year Member



Just one quick question before I start my research :p, the address you type in the address bar defines what you see and from the database? From what I understand and heard before, if my site was [site.com...] or somthing like that it would show the show I have in my database with the id of 1? (thats a rough link, I might need to alter it a bit tho)

dmorison

8:59 pm on Apr 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if my site was [site.com...] or somthing like that it would show the show I have in my database with the id of 1?

Yep - you got it!

bobnew32

11:41 pm on Apr 29, 2003 (gmt 0)

10+ Year Member



Just one last question on the matter (I know this has been murdered to death) but how deep does google go to add pages to the search engine? I heard it is one variable such as [site.com...] but would not go [sit.com...] Just to know when I design my site.

daisho

11:52 pm on Apr 29, 2003 (gmt 0)

10+ Year Member



That's a greatly debated topic. Most people say staying less than 2 or 3 is save. Also any parameter with the name of "ID" is bad news.

I would look into using Apache's mod_rewrite to get around you problems.

That's a more advanced topic though and you should get your feet wet first.

daisho

jatar_k

5:11 am on Apr 30, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



similar to what daisho said no id var but 2 vars or less, no exceptions, 3 is pushing it.