I am creating a site similar to this one. http://mzplayer.se/
Basically you paste a string from a certain game and it splits this and stores them in the database as individual numbers/words. This allows users to post their teams (from the game) for anyone to see, without the need for users to sign up.
I am now at the stage where I need to generate a unique id (which I know how to do), but I don't know how to incorporate it into the url (like this - http://mzplayer.se/?id=924180384).
Please can someone give me a useful link or two?
Thanks, wardyb
Url Unique ID
Moderator: General Moderators
Re: Url Unique ID
am I right in thinking post 6 is what i'm looking for?
http://www.sitepoint.com/forums/showthr ... ?p=3072386
I could still do with another example
http://www.sitepoint.com/forums/showthr ... ?p=3072386
I could still do with another example
Re: Url Unique ID
no that wasn't what I was looking for. that involved typing a url to be shortened.
Re: Url Unique ID
i'm not sure what you mean but, is this something like it?
Table:
Players
Columns:
id
players
form.php
createurl.php
geturl.php
this is of cours just a draft, but something like that?
Table:
Players
Columns:
id
players
form.php
Code: Select all
<html>
<form action="createurl.php">
<textarea cols="45" rows="45" name="players"></textarea></form>
Code: Select all
<?
/*mysql_connect-codes*/
mysql_query("INSERT INTO players VALUES('" . rand(100000, 999999) . "','" . $_POST['players'] . "');
?>
Code: Select all
<?
/*mysql_connect-codes*/
$play=mysql_query("SELECT * FROM players WHERE id='" . $_GET['id'] . "'");
while($players=mysql_fetch_array($play))
{
echo $players['players'];
}
?>