Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Form Page Redirect - PHP

New Here ,
Mar 01, 2010 Mar 01, 2010

Hi,

Attached is a mock up of the Home Recipes Page on the site I'm building. When a user clicks on one of the categories (Desserts, Drinks, etc), I want them to be able to go to the Main Page for that category, on which will appear the recipes that have already been posted by them or someone else. Also on the Main Page, I want them to be able to click on a button that takes them to a page on which they can enter a recipe. There are four fields on the Enter Page: Recipe Title, Ingredients, Preparation, Serves How Many.

1. For the Enter Page (in the process of building this one), should I name that something like enterDesserts?

2. For the Main Page, should I name it something like postedDesserts?

     2.a. Will I have to create a container div on the main page for each of the four fields on the enter page?  How do I ensure that the information entered into the fields shows up in the proper divs?

3. For all the redirection that's needed between the pages, what's the best way to go?

I know there are plenty of Form Tutorials, but I've not yet found one that deals with what I'm trying to do.

Thank you!

Example 18-03-15.jpg

TOPICS
Server side applications
740
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 01, 2010 Mar 01, 2010

>As it stands now, (previewing in a browser), when the info is

>submitted, it comes back up on the same page that it was submitted on.

Are you using the insert record behavior or is this handcoded. If you are using the behavior, I believe it contains a field where you can input where you want it to redirect to after insert. Otherwise, you need to code this by hand.

>and how I make sure the info comes up in the proper

>div, so as to ensure it's got some structure, or style to

>it, and not running toge

...
Translate
LEGEND ,
Mar 01, 2010 Mar 01, 2010

Please do not post duplicate threads. You have already started this in the Dreamweaver forum. Please continue with it there.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2010 Mar 01, 2010

I posted here after reading some info via Dreamweaver Help, thinking that perhaps my original post was in the wrong place. I went back to delete it, but was too late.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2010 Mar 01, 2010

And in reply to your response:

OK, when the user submits the form you insert the data into the database, right?

Once the insert is completed, you use a redirect to send them to the page you want them to see. In that page, you use a recordset to display the appropriate data. Is this what you are asking? Can you be more specific about what your problem is?

As it stands now, (previewing in a browser), when the info is submitted, it comes back up on the same page that it was submitted on. That's why I'm asking about redirection, and how I make sure the info comes up in the proper div, so as to ensure it's got some structure, or style to it, and not running together.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 01, 2010 Mar 01, 2010

>As it stands now, (previewing in a browser), when the info is

>submitted, it comes back up on the same page that it was submitted on.

Are you using the insert record behavior or is this handcoded. If you are using the behavior, I believe it contains a field where you can input where you want it to redirect to after insert. Otherwise, you need to code this by hand.

>and how I make sure the info comes up in the proper

>div, so as to ensure it's got some structure, or style to

>it, and not running together.

Laying out dynamic pages is pretty much the same as static pages. Start by designing your page using dummy placeholders in the divs you want so you can get an idea how the layout will look. Once done, replace the dummy data with your dynamic fields from the recordset.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2010 Mar 02, 2010
LATEST

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines