Possible Duplicate:
How to generate unique id in mys开发者_运维知识库ql?
I have a uniqid()
php script on my site which generates a unique id for every unique visitor. I would like to give each user a unique link which is displayed in a an input form, in the form of http://website.com/?id=12345
. Does anyone know how to do this?
I saw a different site accomplish this, so I know it's possible. I also know that I have to use the $_GET
function since there is a ?
after the url. Help.
<form action="http://website.com/" method="get">
<input type="hidden" name="id" value="<?=uniqid()?>" />
<input type="submit" value="Submit" />
</form>
This should do the trick...
Then on the page you submit to...
<?php
echo $_GET['id'];
?>
精彩评论