phplib-users Mailing List for PHPLIB (Page 35)
Brought to you by:
nhruby,
richardarcher
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(106) |
Sep
(99) |
Oct
(44) |
Nov
(97) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(56) |
Feb
(81) |
Mar
(134) |
Apr
(69) |
May
(106) |
Jun
(122) |
Jul
(98) |
Aug
(52) |
Sep
(184) |
Oct
(219) |
Nov
(102) |
Dec
(106) |
2003 |
Jan
(88) |
Feb
(37) |
Mar
(46) |
Apr
(51) |
May
(30) |
Jun
(17) |
Jul
(45) |
Aug
(19) |
Sep
(5) |
Oct
(4) |
Nov
(12) |
Dec
(7) |
2004 |
Jan
(11) |
Feb
(7) |
Mar
|
Apr
(15) |
May
(17) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
(8) |
Oct
(6) |
Nov
(21) |
Dec
(13) |
2005 |
Jan
(4) |
Feb
(3) |
Mar
(7) |
Apr
(7) |
May
|
Jun
(11) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(5) |
2007 |
Jan
(15) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
(3) |
Jul
(1) |
Aug
(19) |
Sep
(2) |
Oct
|
Nov
|
Dec
(6) |
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
From: Marko K. <M.K...@os...> - 2002-10-31 09:09:15
|
Hi, > $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace("([?&])" . > $this->urlaction . "=(.)*&*", "\\1", > $HTTP_SERVER_VARS["QUERY_STRING"]); Well, here I don't understand what is actually done. Looks like it searches for GET parameters (called urlaction) and tries to locate them in the GET string embraced by [?&] and [&]. But I cannot forsee what happens if there are more than one '&' for instance. Could be the (.)* construct would eat that as well. I'd expect at least stg like (.*) to get the full string, or even better ([^&]*) to avoid any ampersands in the param content. On the other hand I don't understand the \\1 parameter, since it would just return the ([?&]) character. \\2 wouldn't be used anyway. Looking at this is now it looks like it should simply remove the urlaction parameter from the QUERY_STRING. Is this true??? But then, look at this: ---snip--- ***script start*** <?php $a='url?test=testen&&test2=test2en&'; echo "Rewrote:".ereg_replace("([?&])test=(.)*&*", "\\1",$a)."\n"; ?> ***script end*** ***script output start*** X-Powered-By: PHP/4.1.1 Content-type: text/html Rewrote:url? ***script output end*** ---snip--- So everything is eaten by the RE, just "url?" ist left! Looks like this regexp does not what it should. Maybe I misunderstood something... What do you really want to do with this rewrite of the url, looks like I skipped that part of the discussion somehow, sorry? > $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace("[&][&]+", "&", > $HTTP_SERVER_VARS["QUERY_STRING"]); The RE could be rewritten as "[&]{2,}" to delete only multiple ampersands. Marko |
From: Marko K. <M.K...@os...> - 2002-10-31 08:23:06
|
Hi Joe, > http://phplib.sourceforge.net/showroom/dev/ doesn't work if I disable cookies! This is connected to what I pointed out in my post: Mon, 28 Oct 2002 15:02:23 +0100 (CET) From: Marko Kaening <ka...@fl...> To: phplib-users list <php...@li...> Subject: phplib4 trans_sid question --- Is there no way to use fallback mode though? Marko |
From: Dr T. S. <ta...@sa...> - 2002-10-31 01:30:02
|
On Wed, 30 Oct 2002, Benjamin Hoft wrote: > How can i validate if either one or the other of two textfields (or both) > is being fillied with some sort of text ? > > normally i would use js with a script like this: Put your custom js in the extra - and remember ideally you will have to test this server side as well See the manual HTH Tarique -- ============================================================= PHP Applications for E-Biz: http://www.sanisoft.com Indian PHP User Group: http://groups.yahoo.com/group/in-phpug ============================================================= |
From: Joe S. <jo...@be...> - 2002-10-30 20:15:55
|
On Wed, Oct 30, 2002 at 05:17:11PM +0530, Dr Tarique Sani wrote: > > I think it is ready... ... > > If not anything for a Beta release OR as a Release candidate > > We need people to download it and try it ... ... > Since some may not have had the time to download and try I posted the examples in the pages/ directory here: http://phplib.sourceforge.net/showroom/dev/ Note the differences in the default auth example: http://phplib.sourceforge.net/showroom/dev/defauth.php3 Gian has shown a couple of things that the existing auth doesn't provide - A login form on a default auth page. The ability to show a login form, then abandon it and return to a default auth page. The existing showoff and defauth in cvs cannot be used together. You can go back and forth seamlessly in this example. This example is running php4 sessions and register_globals off. The reg mode simply doesn't have a register form installed yet. If this seems like a good thing, please download the snapshot, test, and then give feedback how it works for your given installation. Joe > > Tarique > -- |
From: Giancarlo P. <gia...@na...> - 2002-10-30 18:16:42
|
Dr Tarique Sani wrote: > > On Wed, 30 Oct 2002, Giancarlo Pinerolo wrote: > > > Isn't this what is actually in the new auth->check_feature() function? > > I think this is all in the snapshot already. > > Joe, Tarique, when are we going to make a new distrib out of the > > snapshot? > > I think it is ready... ... > > If not anything for a Beta release OR as a Release candidate > > We need people to download it and try it ... ... > That's why I say let's put it somewhere more visible, few people are aware of the snapshots. Let's freeze on something and feed it. To get the latest fixes (upon *just reading* the 20021022.dev code, as I cannot test it here), we need to correct the login_if url rewriting so that it will keep other GET data in the string. Rub Hutt proposed this change I don't know if that works, but.. $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace("([?&])" . $this->urlaction . "=(.)*&*", "\\1", $HTTP_SERVER_VARS["QUERY_STRING"]); $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace("[&][&]+", "&", $HTTP_SERVER_VARS["QUERY_STRING"]); I can't try it, and don't know if it works, and I don't know why there's two ereg_replace there. I have a bad relation with regexp in general. I posted my correction recently to Joe, and that could be tried too. And BTW this change should be applied to the url rewriting in the session(4) url() function too, when the SID (Example_Session=xyz) is cleared from the url The other still unclear point is where/how/when the auth_preauth function should be called in the start() method cascade. For the rest everything seems a quite stable compromise of choices in line with the goal of being a drop-in replacement that will also woork for most existing sites. So for me it's OK as it is. Gian |
From: Taylor, S. <Ste...@uk...> - 2002-10-30 15:49:57
|
$f = new form; $f->add_element(.... ... $f->start("MyFunction","POST","index.php","","FormName"); ^^^^ This parameter specifies that you want to create a form onsubmit javascript function. ... $f->finsh("", " if (f.input1.value=='' && f.input2.value=='') { alert('your message'); return false; } " ); Use the finish function to put none phplib generated code into the onsubmit function. i.e. function finish($after, $before) Therefore, the above call will add onsubmit attribute to the form tag <FORM ......."onsubmit"="return MyFunction_Validator(this)"> ... And generate the javascript function code. <SCRIPT> function MyFunction_Validator(f) { // $before if (f.input1.value=='' && f.input2.value=='') { alert('your message'); return false; } phplib generated javascript code // $after ... } </SCRIPT> ... -Stewart -----Original Message----- From: Benjamin Hoft [mailto:ho...@eu...] Sent: 30 October 2002 15:27 To: 'Php...@li...' Subject: [Phplib-users] How to validate a oohform with js ? How can i validate if either one or the other of two textfields (or both) is being fillied with some sort of text ? normally i would use js with a script like this: <SCRIPT> function validate() { if (document.form.input1.value=="" && document.form.input2.value=="") { alert ("please insert some text in one of the input fields"); } else { document.form.submit(); } } </SCRIPT> and use this function on a link <a href="javascript:Validate();">submit</a> but how can i do that with phplib, with oohforms and templates ? i couly only validate both fields if they are empty, but what if only one must be entered with text ? best regards Benjamin ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Benjamin H. <ho...@eu...> - 2002-10-30 15:24:38
|
How can i validate if either one or the other of two textfields (or both) is being fillied with some sort of text ? normally i would use js with a script like this: <SCRIPT> function validate() { if (document.form.input1.value=="" && document.form.input2.value=="") { alert ("please insert some text in one of the input fields"); } else { document.form.submit(); } } </SCRIPT> and use this function on a link <a href="javascript:Validate();">submit</a> but how can i do that with phplib, with oohforms and templates ? i couly only validate both fields if they are empty, but what if only one must be entered with text ? best regards Benjamin |
From: Rob H. <rob...@ws...> - 2002-10-30 14:23:35
|
It is partially fixed in session.inc, but not in session4.inc which I am using. In session.inc, the correct variables are being used to build the url, but the note about not using the function is still there and I am not sure that the url needs to be encoded multiple times to reach the goal. session4.inc is still using getenv('REQUEST_URI') to get the URL. This does not work under IIS. > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Giancarlo > Pinerolo > Sent: Wednesday, October 30, 2002 2:52 AM > To: rob...@ws... > Cc: Phplib-Users > Subject: Re: [Phplib-users] auth url question > > > > The crcloginform.html from the snapshot calls $auth->url() which calls > > $sess->self_url() to populate the for post action. > $sess->self_url() calls > > getenv('REQUEST_URI') which my understanding is does not work under some > > In the snapshot this ha been solved long ago. You are probably mixing > things then. > We have decided that url rewriting/preparation has to be done on > HTP_SERVER_VARS[Query_string], and self_url() has to use that. They > are 2 different varibles, and if we 'prepare' REQUEST_URI, then in > self_url we have to use that, or vv. > > Gian > > > > > > can the getenv('REQUEST_URI') in self_url() be changed to > $PHP_SELF . "?" . > > $HTTP_SERVER_VARS['QUERY_STRING']; ? > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users > > |
From: Rob H. <rob...@ws...> - 2002-10-30 13:17:16
|
Right, but what I am saying is that once the login page is triggered with login_if, you cannot easily get to the protected page, in other words, back in to default auth, without clicking back, then on the link again. You cannot simply refresh. I have created a version of auth from the snapshot that does this. I have eliminated login_if completely. It is attached. Good luck. > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Joe > Stewart > Sent: Tuesday, October 29, 2002 12:56 PM > To: Phplib-Users > Subject: Re: [Phplib-users] Login_if question > > > Hi Rob, > > trying to understand a little better... > > On Mon, Oct 28, 2002 at 10:34:56PM -0500, Rob Hutton wrote: > > I have been going back over some of the posts that lead to the > insertion of > > the regex into the login_if function and I am not sure that > this actually > > does anything. > > > > My understanding of the discussion was that if someone browsed to > > "www.url.com/again=log" that the only way to see the protected > page (go back > > into default mode) was to have a cancel login button. > > Do you mean unprotected? More general changes to auth are what enabled > abandoning a login form. Not the "again" regex stuff. > > > And this is still the > > case because refreshing takes you back to > "www.url.com/again=log" no matter > > how much regex's are done. All it does is strip it off the > submit button, > > which results in you being able to refresh after you have > failed to log in > > once. > > It removes it on success too. The example scripts had a problem > that on a > successful login, the form was triggered again because of the get > variable. > > I believe Richard Archer added some logic to defauth.php3 to remove the > get variable from the query string but left the global variable to > trigger the login form. This is from memory so may not be entirely > correct. > > > Am I wrong here? If I am not, then there is no way around > this except to > > set a session variable and do a document.src = , look for the session > > variable being set, and run auth if it is. This would eliminate the > > problem, but depends on JavaScript being available and working. I don't > > think this is necessarily a bad thing. You could throw up a > page that says, > > "Initializing login process, please click refresh if the login > prompt does > > not appear in 5 seconds." > > > > What is the goal? To trigger a login form when needed, but not otherwise > on a unprotected page? > > You could set a return link on the login page that does not contain the > trigger variable. > > > What does everyone think is reasonable here? > > > > I don't think it is necessary to have the "urlaction" logic in auth.inc > but doesn't get in the way so it's not a bother to me. > > Joe > > > Rob Hutton > > Web Safe > > www.wsafe.com > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users > > |
From: Dr T. S. <ta...@sa...> - 2002-10-30 12:14:17
|
On Wed, 30 Oct 2002, Giancarlo Pinerolo wrote: > Isn't this what is actually in the new auth->check_feature() function? > I think this is all in the snapshot already. > Joe, Tarique, when are we going to make a new distrib out of the > snapshot? I think it is ready... ... If not anything for a Beta release OR as a Release candidate We need people to download it and try it ... ... Tarique -- ============================================================= PHP Applications for E-Biz: http://www.sanisoft.com Indian PHP User Group: http://groups.yahoo.com/group/in-phpug ============================================================= |
From: Benjamin H. <ho...@eu...> - 2002-10-30 10:49:10
|
hmm i got one problem I have obe problem how save the submitted data in an object ? could someone please give an example ? thanks Benjamin > ---------- > From: Michael Chaney[SMTP:mdc...@mi...] > Sent: 29 October 2002 18:28 > To: Benjamin Hoft > Cc: 'php...@li...' > Subject: Re: [Phplib-users] How to make a multipage data submition... ? > > On Tue, Oct 29, 2002 at 01:52:29PM +0100, Benjamin Hoft wrote: > > Hi > > my problem is, that i have to make a page > > on which i can go to serveral other pages and submit each entered data to the next page which is insertet on the dbase on the last page. > > > > But how can i do this ?? > > any suggestions or Ideas ? > > > > > > The pages eg. must look like this > > > > 1. page > > addressdata input fields > > 2. page > > firm selection > > 3. page > > other stuff selection > > 4. page > > enter the given data into dbase > > The reasonable way to do it is to store the data in the session, > probably best in an array or object. Put all the pages into a single > .php file, and keep track of which "page" the user is on. At the bottom > of the page, put a "Next" and a "Previous" button. > > Your program logic looks like this: > > if (is_numeric($_REQUEST['page'])) $page=$_REQUEST['page']; > if (!$page) $page=0; > > { store form values in session } > > if ($_REQUEST['submit']=='Previous' && $page>1) { > $page--; > } elseif ($page<$last_page) { > { validate form values } > $page++; > } > > if ($page==1) { > # show page 1 > } elseif ($page==2) { > # show page 2 > etc. > > Your last page might post to another file for the final submission. > Given how users are, you should put your "Previous" button at the top, > also. Obviously, the code is a bit more complex than this, but I think > you can get the general flow of it. > > This way, they'll get to move back and forth without causing trouble. > They can always force it to skip pages, but you can always set flags to > make sure each page's data base been validated and don't allow the final > page if all pages haven't been validated. > > I did an application like this earlier this year, and if I ever get > around to writing the advanced PHP book this will probably be a chapter. > > Michael > -- > Michael Darrin Chaney > mdc...@mi... > http://www.michaelchaney.com/ > |
From: Giancarlo P. <gia...@na...> - 2002-10-30 09:12:07
|
Isn't this what is actually in the new auth->check_feature() function? I think this is all in the snapshot already. Joe, Tarique, when are we going to make a new distrib out of the snapshot? Gian Benjamin Boksa wrote: > > Hi! > > I patched page.inc as follows to be able to use different auth-types > wihtout changing the session. I wonder if this is useful and I wonder > what you think about this patch: > > *** page.inc.orig Mon Oct 28 16:34:14 2002 > --- page.inc Mon Oct 28 16:35:22 2002 > *************** > *** 22,28 **** > if (isset($feature["auth"])) { > global $auth; > > ! if (!isset($auth)) { > $auth = new $feature["auth"]; > } > $auth->start(); > --- 22,28 ---- > if (isset($feature["auth"])) { > global $auth; > > ! if (!isset($auth) || ($auth->classname != $feature["auth"])) { > $auth = new $feature["auth"]; > } > $auth->start(); > > Regards, > > Benne > > -- > > Benjamin Boksa > b....@si... > > side by site GmbH & Co. KG > Druckgestaltung & Webdesign > > Barbarastr. 3-9 (Block 6) > D-50735 Koeln > > Fon: +49 221 2790964 > Fax: +49 221 2790965 > > http://www.sidebysite.de/ > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Benjamin B. <b....@si...> - 2002-10-30 08:18:35
|
Hi! I patched page.inc as follows to be able to use different auth-types wihtout changing the session. I wonder if this is useful and I wonder what you think about this patch: *** page.inc.orig Mon Oct 28 16:34:14 2002 --- page.inc Mon Oct 28 16:35:22 2002 *************** *** 22,28 **** if (isset($feature["auth"])) { global $auth; ! if (!isset($auth)) { $auth = new $feature["auth"]; } $auth->start(); --- 22,28 ---- if (isset($feature["auth"])) { global $auth; ! if (!isset($auth) || ($auth->classname != $feature["auth"])) { $auth = new $feature["auth"]; } $auth->start(); Regards, Benne -- Benjamin Boksa b....@si... side by site GmbH & Co. KG Druckgestaltung & Webdesign Barbarastr. 3-9 (Block 6) D-50735 Koeln Fon: +49 221 2790964 Fax: +49 221 2790965 http://www.sidebysite.de/ |
From: Giancarlo P. <gia...@na...> - 2002-10-30 07:05:58
|
> The crcloginform.html from the snapshot calls $auth->url() which calls > $sess->self_url() to populate the for post action. $sess->self_url() calls > getenv('REQUEST_URI') which my understanding is does not work under some In the snapshot this ha been solved long ago. You are probably mixing things then. We have decided that url rewriting/preparation has to be done on HTP_SERVER_VARS[Query_string], and self_url() has to use that. They are 2 different varibles, and if we 'prepare' REQUEST_URI, then in self_url we have to use that, or vv. Gian > > can the getenv('REQUEST_URI') in self_url() be changed to $PHP_SELF . "?" . > $HTTP_SERVER_VARS['QUERY_STRING']; ? |
From: Joe S. <jo...@be...> - 2002-10-29 18:00:01
|
Hi Rob, trying to understand a little better... On Mon, Oct 28, 2002 at 10:34:56PM -0500, Rob Hutton wrote: > I have been going back over some of the posts that lead to the insertion of > the regex into the login_if function and I am not sure that this actually > does anything. > > My understanding of the discussion was that if someone browsed to > "www.url.com/again=log" that the only way to see the protected page (go back > into default mode) was to have a cancel login button. Do you mean unprotected? More general changes to auth are what enabled abandoning a login form. Not the "again" regex stuff. > And this is still the > case because refreshing takes you back to "www.url.com/again=log" no matter > how much regex's are done. All it does is strip it off the submit button, > which results in you being able to refresh after you have failed to log in > once. It removes it on success too. The example scripts had a problem that on a successful login, the form was triggered again because of the get variable. I believe Richard Archer added some logic to defauth.php3 to remove the get variable from the query string but left the global variable to trigger the login form. This is from memory so may not be entirely correct. > Am I wrong here? If I am not, then there is no way around this except to > set a session variable and do a document.src = , look for the session > variable being set, and run auth if it is. This would eliminate the > problem, but depends on JavaScript being available and working. I don't > think this is necessarily a bad thing. You could throw up a page that says, > "Initializing login process, please click refresh if the login prompt does > not appear in 5 seconds." > What is the goal? To trigger a login form when needed, but not otherwise on a unprotected page? You could set a return link on the login page that does not contain the trigger variable. > What does everyone think is reasonable here? > I don't think it is necessary to have the "urlaction" logic in auth.inc but doesn't get in the way so it's not a bother to me. Joe > Rob Hutton > Web Safe > www.wsafe.com > |
From: Michael C. <mdc...@mi...> - 2002-10-29 17:17:44
|
On Tue, Oct 29, 2002 at 01:52:29PM +0100, Benjamin Hoft wrote: > Hi > my problem is, that i have to make a page > on which i can go to serveral other pages and submit each entered data to the next page which is insertet on the dbase on the last page. > > But how can i do this ?? > any suggestions or Ideas ? > > > The pages eg. must look like this > > 1. page > addressdata input fields > 2. page > firm selection > 3. page > other stuff selection > 4. page > enter the given data into dbase The reasonable way to do it is to store the data in the session, probably best in an array or object. Put all the pages into a single .php file, and keep track of which "page" the user is on. At the bottom of the page, put a "Next" and a "Previous" button. Your program logic looks like this: if (is_numeric($_REQUEST['page'])) $page=$_REQUEST['page']; if (!$page) $page=0; { store form values in session } if ($_REQUEST['submit']=='Previous' && $page>1) { $page--; } elseif ($page<$last_page) { { validate form values } $page++; } if ($page==1) { # show page 1 } elseif ($page==2) { # show page 2 etc. Your last page might post to another file for the final submission. Given how users are, you should put your "Previous" button at the top, also. Obviously, the code is a bit more complex than this, but I think you can get the general flow of it. This way, they'll get to move back and forth without causing trouble. They can always force it to skip pages, but you can always set flags to make sure each page's data base been validated and don't allow the final page if all pages haven't been validated. I did an application like this earlier this year, and if I ever get around to writing the advanced PHP book this will probably be a chapter. Michael -- Michael Darrin Chaney mdc...@mi... http://www.michaelchaney.com/ |
From: <zol...@ne...> - 2002-10-29 13:55:50
|
From: Rob H. <rob...@ws...> - 2002-10-29 13:13:00
|
There are two options that I can think of immediately. The first and most commonly used (but maybe not the best) is to put things on the form in hidden fields. The preferable way in my opinion is to create a user object that stores the data and save that object to the session. Then a user->write() or some such to save it to the db. > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Benjamin > Hoft > Sent: Tuesday, October 29, 2002 7:52 AM > To: 'php...@li...' > Subject: [Phplib-users] How to make a multipage data submition... ? > > > Hi > my problem is, that i have to make a page > on which i can go to serveral other pages and submit each entered > data to the next page which is insertet on the dbase on the last page. > > But how can i do this ?? > any suggestions or Ideas ? > > > The pages eg. must look like this > > 1. page > addressdata input fields > 2. page > firm selection > 3. page > other stuff selection > 4. page > enter the given data into dbase > > > I don´t really know if i should submit all the data from page to > page into hiddenfields or if there is another solution > > the procedure of a users entry should be done step by step (maybe > also backwards to change something which was forgotten ;) ) > and in the end a question if the data should be inserted into > database or not. > > Thank you for any ideas > > best regards Benjamin ;) > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users > > |
From: Peter C. <li...@kr...> - 2002-10-29 13:12:55
|
Hi My approach would be to store the form values in a array held as a session= variable. That means that the data is available in all the screens (so you= can have a summary of what's been said so far). You can also do stuff like= remembering the current screen for when the user comes back in this= session. Once the record has been confirmed, you can insert the data into your= database and then unregister the array. I don't use the forms package - it might well have functionality to help you= manage and validate your multiscreen form. Maybe someone else can comment= on this? Also, look at http://www.sanisoft.com/phplib/manual/oohforms.php HTH Peter At 13:52 29/10/02 +0100, Benjamin Hoft wrote: >Hi=20 >my problem is, that i have to make a page >on which i can go to serveral other pages and submit each entered data to= the next page which is insertet on the dbase on the last page. > >But how can i do this ?? >any suggestions or Ideas ? > > >The pages eg. must look like this > >1. page=20 > addressdata input fields >2. page=20 > firm selection=20 >3. page=20 > other stuff selection >4. page=20 > enter the given data into dbase > > >I don=B4t really know if i should submit all the data from page to page= into hiddenfields or if there is another solution=20 > >the procedure of a users entry should be done step by step (maybe also= backwards to change something which was forgotten ;) )=20 >and in the end a question if the data should be inserted into database or= not. > >Thank you for any ideas=20 > >best regards Benjamin ;) > > > > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Phplib-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phplib-users=20 |
From: Rob H. <rob...@ws...> - 2002-10-29 13:10:11
|
Correct, sorry... > -----Original Message----- > From: Marko Kaening [mailto:M.K...@os...] > Sent: Tuesday, October 29, 2002 3:54 AM > To: Rob Hutton > Cc: phplib-users list > Subject: Re: [Phplib-users] auth url question > > > > can the getenv('REQUEST_URI') in self_url() be changed to > $PHP_SELF . "?" . > > $HTTP_SERVER_VARS['QUERY_STRING']; ? > As I understood one should use $_SERVER['PHP_SELF'] instead to make it > work as well with register_global=OFF! > > Marko > > |
From: Benjamin H. <ho...@eu...> - 2002-10-29 12:50:00
|
Hi=20 my problem is, that i have to make a page on which i can go to serveral other pages and submit each entered data = to the next page which is insertet on the dbase on the last page. But how can i do this ?? any suggestions or Ideas ? The pages eg. must look like this 1. page=20 addressdata input fields 2. page=20 firm selection=20 3. page=20 other stuff selection 4. page=20 enter the given data into dbase I don=B4t really know if i should submit all the data from page to page = into hiddenfields or if there is another solution=20 the procedure of a users entry should be done step by step (maybe also = backwards to change something which was forgotten ;) )=20 and in the end a question if the data should be inserted into database = or not. Thank you for any ideas=20 best regards Benjamin ;) |
From: Marko K. <M.K...@os...> - 2002-10-29 08:53:50
|
> can the getenv('REQUEST_URI') in self_url() be changed to $PHP_SELF . "?" . > $HTTP_SERVER_VARS['QUERY_STRING']; ? As I understood one should use $_SERVER['PHP_SELF'] instead to make it work as well with register_global=OFF! Marko |
From: Rob H. <rob...@ws...> - 2002-10-29 03:32:07
|
I have been going back over some of the posts that lead to the insertion of the regex into the login_if function and I am not sure that this actually does anything. My understanding of the discussion was that if someone browsed to "www.url.com/again=log" that the only way to see the protected page (go back into default mode) was to have a cancel login button. And this is still the case because refreshing takes you back to "www.url.com/again=log" no matter how much regex's are done. All it does is strip it off the submit button, which results in you being able to refresh after you have failed to log in once. Am I wrong here? If I am not, then there is no way around this except to set a session variable and do a document.src = , look for the session variable being set, and run auth if it is. This would eliminate the problem, but depends on JavaScript being available and working. I don't think this is necessarily a bad thing. You could throw up a page that says, "Initializing login process, please click refresh if the login prompt does not appear in 5 seconds." What does everyone think is reasonable here? Rob Hutton Web Safe www.wsafe.com |
From: Rob H. <rob...@ws...> - 2002-10-29 03:32:00
|
The crcloginform.html from the snapshot calls $auth->url() which calls $sess->self_url() to populate the for post action. $sess->self_url() calls getenv('REQUEST_URI') which my understanding is does not work under some circumstances and bypasses the regex done in login if. It also calls $sess->url() which is marked do not use for some reason. So I have a question and a suggestion. Question: $sess->url() refers to using the php url rewriting functions which is already done. So can the comment about not using $sess->url() be removed and the lines: // Encode naughty characters in the URL $url = str_replace(array("<", ">", " ", "\"", "'"), array("%3C", "%3E", "+", "%22", "%27"), $url); be removed as the urlencode on the lines above that already do this? can the getenv('REQUEST_URI') in self_url() be changed to $PHP_SELF . "?" . $HTTP_SERVER_VARS['QUERY_STRING']; ? Rob Hutton Web Safe www.wsafe.com ********************************************************************** Introducing Symantec Client Security - Integrated Anti-Virus, Firewall, and Intrusion Detection for the Client. Learn more: http://enterprisesecurity.symantec.com/symes238.cfm?JID=2&PID=11624271 |
From: David Y. Ng <dn...@sn...> - 2002-10-28 17:46:11
|