RE: [PHP] Re: Is there a GoTo Page Function?
Andre, In your php database storage code, after ? but before anything else you can do a (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.); Hope this helps. Brian -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 7:04 PM To: hugh danaher Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Is there a GoTo Page Function? Hi Hugh, Thanks - I can access the next page now. But I've got a new problem: even if the fields are all empty, a carriage return sends me off to the next form [Bad! Bad, form - that's not what I want you to do!] Where would you insert: if (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.); I tried in the php database storage code (didn't work). Tried it after the appropriate 'Name' code in the form's html document. Didn't work. I know that it should work somewhere . . . . Somehow, I don't think the Submit function is working as it should (especially if a carriage return or Enter can override everything). Is there some code that will defeat this undesirable activity? Oh this is so much fun :) -- I love the long days and even longer nights. I'm glad I've got four months to put this new site together. Any insights and help will be greatly appreciated! Tia, Andre On Tuesday 05 March 2002 16:50, you wrote: Andre, Have your form action point to a page that has your database storage code, and nothing else (no screen output at all!). Have this page start with the ?php tag with nothing above the tag (no html and no blank lines either!). Once your storage is complete, then use the header(location: somepageyouname) to go to the page you have next in line. Oh, and make sure to use the ? to end your php code. Once you get the above to work, then you can add decision statements which will help qualify your data. (e.g. if (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.);). Hope this helps, Hugh - Original Message - From: Michael Kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 1:15 PM Subject: [PHP] Re: Is there a GoTo Page Function? Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but I cannot figure out how to do this basic function. I assume that when one clicks a Submit button, the info is sent to the server, but how do you call a new page? [In my old Paradox PAL days, this was accomplished very easily. I cannot find a corresponding function either in PHP or html.] (I.e: Once a person clicks on Input type=submit value=Accept Is there a function that can redirect the form to a new form?) Any help here would be greatly appreciated (or pointers to a good working tutorial that covers this area!) Usually people will do one of two things: Make the action of the form tag point to the new page directly. That page would take care of any form data processing that needed to happen. OR Have the form call itself, then when it's done, use a HEADER tag with location: to redirect header(Location: newpage.php); Hope that helps. Michael Kimsal http://www.phphelpdesk.com 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the suffering souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Is there a GoTo Page Function?
You can also use JavaScript to redirect the user to another page. After your form has finished updating your database, do the following: ?php echo script language=\javascript\window.location.href='NEXT_PAGE.html';/script; ? Note: Your client's browser must support JavaScript for this to work. As suggested by Hugh, it's much better to use the php header(); tag. But, this will only work if you haven't already passed a header to your page. O From Now 'Till Then, \-Reginald Alex Mullin /\ 212-894-1690 -Original Message- From: hugh danaher [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 4:51 PM To: php Subject: Re: [PHP] Re: Is there a GoTo Page Function? Andre, Have your form action point to a page that has your database storage code, and nothing else (no screen output at all!). Have this page start with the ?php tag with nothing above the tag (no html and no blank lines either!). Once your storage is complete, then use the header(location: somepageyouname) to go to the page you have next in line. Oh, and make sure to use the ? to end your php code. Once you get the above to work, then you can add decision statements which will help qualify your data. (e.g. if (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.);). Hope this helps, Hugh - Original Message - From: Michael Kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 1:15 PM Subject: [PHP] Re: Is there a GoTo Page Function? Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but I cannot figure out how to do this basic function. I assume that when one clicks a Submit button, the info is sent to the server, but how do you call a new page? [In my old Paradox PAL days, this was accomplished very easily. I cannot find a corresponding function either in PHP or html.] (I.e: Once a person clicks on Input type=submit value=Accept Is there a function that can redirect the form to a new form?) Any help here would be greatly appreciated (or pointers to a good working tutorial that covers this area!) Usually people will do one of two things: Make the action of the form tag point to the new page directly. That page would take care of any form data processing that needed to happen. OR Have the form call itself, then when it's done, use a HEADER tag with location: to redirect header(Location: newpage.php); Hope that helps. Michael Kimsal http://www.phphelpdesk.com 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at [EMAIL PROTECTED] www.sothebys.com ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Is there a GoTo Page Function?
On Tuesday 05 March 2002 16:15, you wrote: Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but I cannot figure out how to do this basic function. I assume that when one clicks a Submit button, the info is sent to the server, but how do you call a new page? [In my old Paradox PAL days, this was accomplished very easily. I cannot find a corresponding function either in PHP or html.] (I.e: Once a person clicks on Input type=submit value=Accept Is there a function that can redirect the form to a new form?) Any help here would be greatly appreciated (or pointers to a good working tutorial that covers this area!) Usually people will do one of two things: Make the action of the form tag point to the new page directly. That page would take care of any form data processing that needed to happen. OR Have the form call itself, then when it's done, use a HEADER tag with location: to redirect header(Location: newpage.php); Hope that helps. Michael Kimsal http://www.phphelpdesk.com 734-480-9961 Thanks Michael, Again, my 'newbieness' is going to be very apparent. For the first option you referenced the 'action of the form tag' -- what is that? Do you mean, as in 'form action=demo.php method=get'? Your second suggestion sounds like what I want to achieve, but I'm not clear as to what you mean or refer to: have the form call itself -- How do I do that? And secondly, where would I put the header tag: with the calling form or the called form? Oh, it's so embarassing to know so little :) Tia, Andre -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the suffering souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Is there a GoTo Page Function?
Andre, Have your form action point to a page that has your database storage code, and nothing else (no screen output at all!). Have this page start with the ?php tag with nothing above the tag (no html and no blank lines either!). Once your storage is complete, then use the header(location: somepageyouname) to go to the page you have next in line. Oh, and make sure to use the ? to end your php code. Once you get the above to work, then you can add decision statements which will help qualify your data. (e.g. if (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.);). Hope this helps, Hugh - Original Message - From: Michael Kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 1:15 PM Subject: [PHP] Re: Is there a GoTo Page Function? Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but I cannot figure out how to do this basic function. I assume that when one clicks a Submit button, the info is sent to the server, but how do you call a new page? [In my old Paradox PAL days, this was accomplished very easily. I cannot find a corresponding function either in PHP or html.] (I.e: Once a person clicks on Input type=submit value=Accept Is there a function that can redirect the form to a new form?) Any help here would be greatly appreciated (or pointers to a good working tutorial that covers this area!) Usually people will do one of two things: Make the action of the form tag point to the new page directly. That page would take care of any form data processing that needed to happen. OR Have the form call itself, then when it's done, use a HEADER tag with location: to redirect header(Location: newpage.php); Hope that helps. Michael Kimsal http://www.phphelpdesk.com 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Is there a GoTo Page Function?
Hi Hugh, Thanks - I can access the next page now. But I've got a new problem: even if the fields are all empty, a carriage return sends me off to the next form [Bad! Bad, form - that's not what I want you to do!] Where would you insert: if (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.); I tried in the php database storage code (didn't work). Tried it after the appropriate 'Name' code in the form's html document. Didn't work. I know that it should work somewhere . . . . Somehow, I don't think the Submit function is working as it should (especially if a carriage return or Enter can override everything). Is there some code that will defeat this undesirable activity? Oh this is so much fun :) -- I love the long days and even longer nights. I'm glad I've got four months to put this new site together. Any insights and help will be greatly appreciated! Tia, Andre On Tuesday 05 March 2002 16:50, you wrote: Andre, Have your form action point to a page that has your database storage code, and nothing else (no screen output at all!). Have this page start with the ?php tag with nothing above the tag (no html and no blank lines either!). Once your storage is complete, then use the header(location: somepageyouname) to go to the page you have next in line. Oh, and make sure to use the ? to end your php code. Once you get the above to work, then you can add decision statements which will help qualify your data. (e.g. if (!isset($name)) die (You need to fill in your name. Use the browser's back button and input this information.);). Hope this helps, Hugh - Original Message - From: Michael Kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 1:15 PM Subject: [PHP] Re: Is there a GoTo Page Function? Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but I cannot figure out how to do this basic function. I assume that when one clicks a Submit button, the info is sent to the server, but how do you call a new page? [In my old Paradox PAL days, this was accomplished very easily. I cannot find a corresponding function either in PHP or html.] (I.e: Once a person clicks on Input type=submit value=Accept Is there a function that can redirect the form to a new form?) Any help here would be greatly appreciated (or pointers to a good working tutorial that covers this area!) Usually people will do one of two things: Make the action of the form tag point to the new page directly. That page would take care of any form data processing that needed to happen. OR Have the form call itself, then when it's done, use a HEADER tag with location: to redirect header(Location: newpage.php); Hope that helps. Michael Kimsal http://www.phphelpdesk.com 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the suffering souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php