fmichiels Posted February 14, 2015 Share Posted February 14, 2015 I must use a hyperlink like this: <a href="https://www.pic-vert.fr/obm/availabilitycalendar.php?id=1&month=2&year=2015&ln=nl"> I want to make it dynamic so that month=2 changes into month='current month' and year = 2015 changes into year = current year. Any help available ? Thanks a lot, Freddy (beginner) Quote Link to comment https://forums.phpfreaks.com/topic/294614-dynamic-hype/ Share on other sites More sharing options...
Ch0cu3r Posted February 14, 2015 Share Posted February 14, 2015 You can use date to get the current month and year. You would then concatenate the month and year to construct the url for the link. Example code $month = use date() to get the current month; $year = use date() to get the current year; // concatate $month and $year to construct the url $url = 'https://www.pic-vert.fr/obm/availabilitycalendar.php?id=1&month='.$month.'&year='.$year.'&ln=nl'; // output hyperlink echo '<a href="'.$url.'">Whatever</a>'; Quote Link to comment https://forums.phpfreaks.com/topic/294614-dynamic-hype/#findComment-1505706 Share on other sites More sharing options...
fmichiels Posted February 15, 2015 Author Share Posted February 15, 2015 Thank you but i do not manage to implement this in a html page. This is the page: http://www.pic-vert.be/ Quote Link to comment https://forums.phpfreaks.com/topic/294614-dynamic-hype/#findComment-1505729 Share on other sites More sharing options...
Ch0cu3r Posted February 15, 2015 Share Posted February 15, 2015 Post the code you tried Quote Link to comment https://forums.phpfreaks.com/topic/294614-dynamic-hype/#findComment-1505732 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.