fraziereel
New Member
I want to set the url of an iframe using PHP, my url is in that format : http://mysite.com/s/ where = numbers, I want to make a button that increase the number in the url of 1 and reload the iframe.\[code\]<html> <head> <meta charset="utf-8" /> <link href="http://stackoverflow.com/questions/14515497/style.css" rel="stylesheet" type="text/css" /> </head> <body> <form class="topBorder"> <p> <?php $site = 6394100; function NextSite($sites) { $sites += 1; return 'http://mywebsite.com/s/' . $sites . '/'; } ?> <a href="http://stackoverflow.com/questions/14515497/<?php echo NextSite($sites); ?>" target="frame"> Next </a> </p> <iframe name="frame" id="frame" src="http://mywebsite.com/s/" class="gagFrame"></iframe> </form> </body></html>\[/code\]