Re: How to make use of the billing token the right way???
| From: | Jason Barnett | Date: | Wed, 16 Feb 2005 00:11:27 +0000 |
| Subject: | Re: How to make use of the billing token the right way??? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-208793@lists.php.net to get a copy of this message | ||
Scott Fletcher wrote:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
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: [application/pgp-signature] OpenPGP digital signature signature.asc