hi friends!i have database with "events" table,then the user clicks on the "events" link on the index page and it searchs in the database all the events loads a page with links to the events. example:

january events ( a link to january events)
february events (another link)

if the user clicks on "january events" the content of the database will be inserted on a page and the user can read it.

how do i do that?

thanks( my first site and a looot of doubts) :S

<a href="event.php?month=01">Jan</a>
<a href="event.php?month=02">Feb</a>
<a href="event.php?month=03">Mar</a>

<?
	
	// -------------- event.php page --------------
	$month = $_REQUEST['month'];
	$days = cal_days_in_month(CAL_GREGORIAN, $month, date('Y'));
	$firstDate = date("Y-m-d", mktime(0, 0, 0, $month ,1, date('Y') ) );
	$LastDate = date("Y-m-d", mktime(0, 0, 0, $month ,$days, date('Y') ) );
	
	echo $sql = "select * from events where date >= '$firstDate' and  date <= '$LastDate'";
?>

a tag is list of months. and in event.php you can write logic like this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.