September 28th, 2012, 03:03 PM
Newbie needs some direction with this
hello everyone. I am teaching myself how to use mysql and I do want to learn PHP. I have done simple connections to my database with form inputs and been able to retrieve simple data from that.
What I want to do is build a database for my mom for her recipes. I would like to add the data through a form (her recipes, etc) but what I would like is that everytime I add data (new recipe) it would create a seperate webpage just for that recipe so later on I can add a site search so she can just type in a recipe and it can give her that specific recipe page.
I was just wondering if someone could just direct to maybe a site that explains this on how to do it?
I do apologize for my novice I am learning as I go.
September 28th, 2012, 03:39 PM
It sounds like you want to use templates. Try here.
There are 10 kinds of people in the world. Those that understand binary and those that don't.
September 28th, 2012, 04:17 PM
Why do you need to save a separate page for every recipe? Why not simply generate it on the fly?
September 28th, 2012, 05:47 PM
Thank you for your responses. And Jaques1 I wouldnt mind just getting info on the fly, i just thought each time I would submit a recipe for her and later when she wants to get that recipe, she could do a search and it would show up as a webpage with a picture and detailed instructions, but I thought it needed to be given it's own page for each submitted recipe.
September 28th, 2012, 08:22 PM
When you eventually get to the search part, this is a good tutorial, I recently used it to build a search mechanism myself.
Originally Posted by hynostroza
"Those who can make you believe absurdities can make you commit atrocities."
September 29th, 2012, 01:57 PM
All recipies will have a separate page but it will have been created on the fly..
1. create one page called recipe.php. and use GET param id which will be supplied by search page.
2. You will then design this recipe page i.e. picture on the left, ingredients on the right, method underneath.
3. This page will use a query to get details from database of a recipe which will all have a unique id.
for your search, you will have a text box, which will be used with a query to get all data from db that matches what is in the box. the results will all point to that recipe page with id appended to it i.e recipe.php?id=1 and recipe.php?id=2 etc