wtroiano Posted October 12, 2009 Share Posted October 12, 2009 Hello, Hoping someone can inform me how I can get PHP to automatically open a set of links in a new tabbed window. Example: $start= 1; $var = $start+1; $end = 5000; Website to open: www.SOMEWEBSITE.com/randomID= $var So I would like to be able to set the start VAR and the END Var and then when i click a button, it will automatically open the URLS each with a new randomId on the end, in a new tab. I have written some code that generats a list of URLS based on my inputs: $start = 900; $end = 1000; for($start; $start < $end; $start++) { $counter = $start + 1; echo "<a href=http://www.SOMESITE.com/?id=$counter >Click $counter</a><br>"; } Thanks in advanced! Link to comment https://forums.phpfreaks.com/topic/177489-openclose-links-in-php/ Share on other sites More sharing options...
.josh Posted October 12, 2009 Share Posted October 12, 2009 php cannot do that. You would need a client-side language like javascript to do that. Link to comment https://forums.phpfreaks.com/topic/177489-openclose-links-in-php/#findComment-935820 Share on other sites More sharing options...
wtroiano Posted October 12, 2009 Author Share Posted October 12, 2009 ohhhh Would you know the code? Thanks Link to comment https://forums.phpfreaks.com/topic/177489-openclose-links-in-php/#findComment-935822 Share on other sites More sharing options...
.josh Posted October 12, 2009 Share Posted October 12, 2009 I'm not going to write code for you but the key ingredient is javascript's "window.open" Link to comment https://forums.phpfreaks.com/topic/177489-openclose-links-in-php/#findComment-935825 Share on other sites More sharing options...
wtroiano Posted October 12, 2009 Author Share Posted October 12, 2009 Thanks You!, I will surely Accomplish my goal with that Link to comment https://forums.phpfreaks.com/topic/177489-openclose-links-in-php/#findComment-935827 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.