PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 28th, 2002, 08:07 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
form to form to form submit

how can i take form data posted to a form from another form and then forward it to another form without having a submit button on the intermediate page. Any help woud be deeply appreciated.

Reply With Quote
  #2  
Old June 28th, 2002, 08:09 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: form to form to form submit

How is the intermediate page sending the user to the third or whatever page? Do they click on a link, it is redirected, etc..


- CBronson

Reply With Quote
  #3  
Old June 28th, 2002, 08:14 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: form to form to form submit

Thats just it, there is to be no link cliking or anything. just a decision made and then a done to the new page.

Reply With Quote
  #4  
Old June 28th, 2002, 08:29 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: form to form to form submit

Well, depending on what your doing with that intermediate page, I'd rethink the way your structuring your program, however if your just looking for the lazy way out. For an easy example, I'll just pull the verbage out of this book next to me on that I think would help you the best.


-------SNIP FROM PHP4 BIBLE---------
One usefull kind of HTTP header is "Location:", which can act as a redirector. Simply put a fully qualified URL after the "Location:" string, and the browser will start over again with the new address instead. An example:

<?php
if ((IsSet($gener) && ($gener == "female"))
{
header("Location: http://somewhere.com/yourmother.php");
exit;
}
?>
<html><head><title>blah</title></head>
<body>
FEMALES ONLY! =P
</body>
</html>

If we simply enter the url for this page we will see the rendering of the html "FEMALES ONLY!" On the other hand, if we include the right GET (or POST for that matter) we will find ourselves redirect to the yourmother.html page.

And in your particular case, just add the correct variables that you want to after the yourmother.html?variable1=this

I'm sure this can be done somehow with a POST, but just like you... I'm to lazy to look through this book!

=)

- CBronson

Reply With Quote
  #5  
Old June 28th, 2002, 10:49 AM
D1NGO D1NGO is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Perth, Australia
Posts: 221 D1NGO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: form to form to form submit

i had a similar situation, although, i couldnt figure out how to do it, so what i did, was have a 'next page' button at the bottom of each page, and then above the html of the next form, insert the data from the form previous and so on....

Reply With Quote
  #6  
Old June 28th, 2002, 03:04 PM
Taoism Taoism is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Winnipeg, MB, Canada
Posts: 81 Taoism User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 2
RE: form to form to form submit

I actually just made an application that does something similar to what you just wrote about.

It's a multi-page 'wizard' that walks users through a process.

Each page is submitted (via next/previous for example) to a validation page, that ensures the data just entered is correct. And if the data is correct the user is forwarded via the header() function to the next/previous page as appropriate. If the data is not correct, the user is sent back (via header() ) to the same page they just came from, along with an error message dialogue explaining what needs to be corrected to continue.

[edited to add]: I forgot to tell you how I passed the info from validation back to the pages
I use the $_SESSION variable to pass the values. Alternatively you can used <input type="hidden"> in the form itself. You would just need to add logic to make sure that you don't write the hidden fields out for a page if you are on that page.

i.e. a three page wizard. The user can navigate backwards and forward through the wizard. So, if the user goes to page 1 enters data, and then clicks next, on page two you would have all the entry fields for page 2 and hidden fields for page 1. If the user now goes back to page 1 to change a piece of data, you display all the entry fields with the old data they entered, and have the page 2 data as hidden fields...etc.

You could also store each page of data entered in a database, and then pull each page out of the db to display it as the user navigates back and forth.
[end edit]

Cheers,
Keith.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > form to form to form submit


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway