solidusjoe Posted June 23, 2007 Share Posted June 23, 2007 Hi, I'm a php n00b, I just started working with it for the first time this week. I've been scroungin around for some help oin this for a while and I am hoping I have found the right place. I am trying to create a user specific id link using some sort of gateway page (i.e. out.php, gateway.php, yada yada). something like this: www.mysite.com/out.php?siteid=123?userid=456 anyone have any resources or code so I can get through this? for the site id I need ti to read the url it is redirecting to from my database. I'll be back to check this forum tongiht, many thanks in advance for any help you guys give me. ~Joe Quote Link to comment Share on other sites More sharing options...
chocopi Posted June 23, 2007 Share Posted June 23, 2007 <?php if(you want '123' and '456') { echo "Use $_GET"; } else if(you want something different) { echo "I did not understand the question"; } ?> do you mean you want to be able to get the 123 and 456 part, if so then use GET or i misunderstood. ~ Chocopi Quote Link to comment Share on other sites More sharing options...
solidusjoe Posted June 24, 2007 Author Share Posted June 24, 2007 :-\ Well that looks like it may put the numbers I need in the url however I do need to somehow take numbers from the dbs in order to put them in the url. Here's a little more of an example of what I'm looking for, say someone is going through an index of links, each url has its own unique id number. The user looking at those links, also has a unique id number associated with their user name, so that when they click on a link to say www.phpfreaks.com the url would look like www.mysite.com/out.php?siteid=<sitenumber>&userid=<useridnumber> It's not a matter of just getting numbers in the url, it is a matter of making each url link dynamically different than that another user would use. While the same site would share site id numbers, the user id numbers would be different based on who is going through them. It also needs to redirect them to that specific url. So i need some page code that would run a little like this: <?php conenct to db containing site_id; put that as the site_id part of the url; record the site url associated with that site id in a variable or something; close datatabase; open the db containing user_id; using the username logged in find the users approriate unique user id and put that in the user_id part of the url; close database redirect to the page associated with the site_id used; ?> Many thanks for your help and consideration! I hope this clears things up a bit. I've seen this done on many sites before, but have no clue as to how they did them. Thank you again in advance to anyone who helps. ~Joe Quote Link to comment Share on other sites More sharing options...
solidusjoe Posted June 24, 2007 Author Share Posted June 24, 2007 Anybody? ??? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.