Jump to content

[SOLVED] Need help with Links


srhino

Recommended Posts

I need help figuring this out.

 

I have a site that on the main page events are listed in order by dates...when people upload an event the put in the month...day...year.  I have them seperated in mysql database as $month $day $year.

 

I want to create a link on my side nav bar for each month

ex

 

January

February

March...etc

 

Is there a way when you click on January that it will pull all the tournaments from jan.

 

The site is set up with an index page that includes maincontacts.inc page that the events display on.

 

Thanks

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/85377-solved-need-help-with-links/
Share on other sites

the link URL will have to use $_GET data that a .php script will then grab and use to run a database query.

 

<a href="www.mypage.com/getMonthData.php?month=January>January</a>

 

<?php //getMonthData.php

$month = $_GET['month'];
//query database
//select * from event where month= '{$month}'
//something like that
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.