#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    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.



    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,833
    Rep Power
    597
    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.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1015
    Hi,

    Why do you need to save a separate page for every recipe? Why not simply generate it on the fly?
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0
    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.
  8. #5
  9. Put a potato on it!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    304
    Rep Power
    972
    Originally Posted by hynostroza
    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.
    When you eventually get to the search part, this is a good tutorial, I recently used it to build a search mechanism myself.
    PHP search
    "Those who can make you believe absurdities can make you commit atrocities."
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Dec 2004
    Posts
    3,071
    Rep Power
    377
    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

IMN logo majestic logo threadwatch logo seochat tools logo