tryingitout Posted July 25, 2009 Share Posted July 25, 2009 I need a php script that will pull the url address for a sales agent that I have already loaded into the mysql database. Right now, the web address is hard wired, here is the code: <?php $URL="http://www.bragdisc.com/OBC/OBC/"; header ("Location: $URL"); ?> instead of the actual web address, i need it to pull the specific url for the agen who has signed in. I see other coded php scripts here as LeadSheet.php#disp and assume the #disp opens the leadsheet for the rep displayed. I am a little lost here. Link to comment https://forums.phpfreaks.com/topic/167413-rep-specific-web-address-to-open/ Share on other sites More sharing options...
waynew Posted July 25, 2009 Share Posted July 25, 2009 Use a GET variable: http://example.com/agents.php?agent_id=3878 $agent_id = $_GET['agent_id']; //SELECT from table Agents (or whatever) where agent_id = $agent_id Link to comment https://forums.phpfreaks.com/topic/167413-rep-specific-web-address-to-open/#findComment-882769 Share on other sites More sharing options...
tryingitout Posted July 25, 2009 Author Share Posted July 25, 2009 Thank you, it gets me closer to what AI need... I have 9 different URLs which is why I need to have the address for the new web page that opens be pulled from the listed address in the mysql database. I have tried the code you sent, but the first part of the address is static, only the rep number changes., which based on what I originally typed is the answer. I need a complete url, which i have in the mysql database, be inserted thru the php script so that a new page opens. Can you advise?? thank you Link to comment https://forums.phpfreaks.com/topic/167413-rep-specific-web-address-to-open/#findComment-882872 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.