Hello everyone,
I'm having trouble assigning my table cell a value that my php page can interpret.
What I'm trying to do is, when a user clicks on a specific table cell, a value is passed to the php page that uses switch/case commands to determine which cell was clicked.
This is part of my table cell code. I tried using a hidden form to give it a value but it didn't work.
<table width="231" height="47" border="1" cellpadding="0" cellspacing="0" bordercolor="#36532E" bgcolor="#CFC38B"
onmouseover="changeIn1();" onmouseout="changeOut1();" id="changer1"
onclick = "getData('data.php','targetDiv');">
<input type ="hidden" name="buttonID" value="1" />
Here is part of my data.php page:
switch ($_GET['buttonID']) {
case '1':
echo $text1;
break;
case '2':
echo $text2;
break;
default:
break;
On my form page I used
<? include('data.php') ?>
To access data.php
Is my hidden form field in the wrong place? Is there another way to do it other then using forms?
Do I have declare the table cell a form before giving it hidden fields?
Sorry for any noobish questions and thanks for any help.