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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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']; ?>" />
    <h3>Your 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-general&w=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=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux