Goldeneye Posted May 8, 2008 Share Posted May 8, 2008 I have a "view single message" link on each forum post. But instead of referring to it like http://foo.bar/forums.php?board=1&topic=1&message=2 where the $_GET['message'] variable is a `messageid` field inside the database; I would like to combine 2 database variables to create a fake message ID like http://foo.bar/forums.php?board=1&topic=1&message=12097672641 where the $_GET['message'] contains a time variable and a userid variable (in this case, the userid is 1) which is the last digit. Is this possible at all? Because I tried a few ways, and it just wouldn't comply. Link to comment https://forums.phpfreaks.com/topic/104644-solved-is-it-possible-to-put-2-sql-variables-inside-a-_get-variable/ Share on other sites More sharing options...
Barand Posted May 8, 2008 Share Posted May 8, 2008 <?php $t = time(); $u = 1; $msg = "$t$u"; $link = "http://foo.bar/forums.php?board=1&topic=1&message=$msg"; echo $link; ?> Link to comment https://forums.phpfreaks.com/topic/104644-solved-is-it-possible-to-put-2-sql-variables-inside-a-_get-variable/#findComment-535638 Share on other sites More sharing options...
Goldeneye Posted May 8, 2008 Author Share Posted May 8, 2008 A big thanks to you Barand! Link to comment https://forums.phpfreaks.com/topic/104644-solved-is-it-possible-to-put-2-sql-variables-inside-a-_get-variable/#findComment-535642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.