Hello,
I am trying to use submit buttons, with different meeting dates as the name. When user clicks (for example) September 9, 2010 button, the text file called September 9, 2010 will open in the other div. If user clicks October button, the October text file would open in other div. I know this code is not correct, but I was trying to test how to do it. can anyone show me how to do this? Thanks

<div id="side-a">
		
		
	<form action="test.php" method="get">
	<input type="submit" name="September 9, 2010"  value="September 9, 2010" />
	<input type="submit" name="October, 2010"  value="October, 2010" />
</form>

	</div>

			

<div id="side-b">

<?php
print $_GET;
print_r($_GET);
print "<p>\r\n"; 
readfile("September 9, 2010.txt"); 
print "</p>\r\n";
?>

give them the SAME name ( name='date' ), but different values. Then $_GET['date'] will give you the date of the button that was clicked.

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.