[PHP] Re: How to make use of the billing token the right way???

2005-02-16 Thread Scott Fletcher
That doesn't look too difficult.  Thanks...  I'll think of something as to
prevent the 2nd page from showing up in the 2nd browser window or 2nd
browser tab window or with the back/forward browser button..

Scott

Jason Barnett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to make use of the billing token the right way???

2005-02-15 Thread Jason Barnett
Scott Fletcher wrote:
I created the token via Javascript where the billing can be controlled
better and to prevent the mixed up of the billing such as incorrect
statements or calculation.  I use the billing lock file for that purpose.  I
found that it doesn't alway work that way when the browser is refreshed or
submitted, so I customized the Javascript to make it work better.  That
solve my problem but I found that some browsers acted too soon or too late
with it's use of Javascript coding to unlocking the file, so the billing
lock doesn't get released.  So, I decided to do it all in PHP so the
browsers' issues can be removed.  I haven't decided how to best make use of
the token via PHP, so I'm wondering if anyone of you can come up with one
that is better than what I can come up with.
Call me crazy... but what about just using a cookie / session mechanism
for this?  One browser, one cookie, your site.  Heck they even generate
tokens for you.  :)
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


[PHP] Re: How to make use of the billing token the right way???

2005-02-15 Thread Scott Fletcher
I can do the Session Token but problem is two browser windows can have the
same Session Token via File -- New Window or Browser Tab.  I have thought
about using the Database Table instead but it all go back to the original
problem with 2 same browser windows that use the same Session.

I'm thinking of a random number or brower's window serial number of some
sort but I don't see how.

Scott

Jason Barnett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to make use of the billing token the right way???

2005-02-15 Thread Jason Barnett
Scott Fletcher wrote:
I can do the Session Token but problem is two browser windows can have the
same Session Token via File -- New Window or Browser Tab.  I have thought
about using the Database Table instead but it all go back to the original
problem with 2 same browser windows that use the same Session.
OK, I get your concern.  In that case why not pass a uniqid() as a
hidden form field in a POST form?  (GET would work also, but not I would
go POST).  If it's a multipage form you can keep passing this uniqid
from one page on to the next.
I'm thinking of a random number or brower's window serial number of some
sort but I don't see how.
Scott
Jason Barnett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


[PHP] Re: How to make use of the billing token the right way???

2005-02-15 Thread Scott Fletcher
Never heard of the uniqid() before and looked it up on the php.net.  It look
very promising.  I can do that.  That leave me with 2 questions.  How do I
do (or how does it work) this with a token if

1) The webpage is submitted (goes from page 1 to page 2) with the uniqid().
2) The 2nd browser window appear with the uniqid().

An example or something would help if you can.

Thanks,
 Scott

Jason Barnett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to make use of the billing token the right way???

2005-02-15 Thread Jason Barnett
Scott Fletcher wrote:
Never heard of the uniqid() before and looked it up on the php.net.  It look
very promising.  I can do that.  That leave me with 2 questions.  How do I
do (or how does it work) this with a token if
1) The webpage is submitted (goes from page 1 to page 2) with the uniqid().
2) The 2nd browser window appear with the uniqid().
An example or something would help if you can.
?php
/** Page 1 of the form (uniqid.php) */
$id = uniqid(rand(), true);
?
html
  form action=uniqid2.php method=POST
input type=hidden value=?php echo $id; ? /
input type=submit /
  /form
/html

?php
/** Page 2 of the form (uniqid2.php) */
if(!$_POST['id']) {
  header('Location: http://yourdomain/uniqid.php');
  exit;
}
?
html
  form action=uniqid2.php method=POST
input type=hidden value=?php $_POST['id']; ? /
h3Your id is ?php echo $_POST['id']; ?/h3
input type=submit /
  /form
/html
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature