Hello there I am a fairly new in MySQL/PHP/Javascript programming. I'm writing a web based gymnast profile management system for my final year project.
Here's my problem.
I have 5 MySQL InnoDB tables: tests, testunits, points, testsgymnast and gymnast
I am able to retrieve a selected test which has particular units and each unit has a point associated with it using AJAX/PHP triple drop down list which is part of my Input Form called 'Create Gymnast Profile'.
My problem is that I don't know how to complete the creation of a gymnast profile by assigning multiple tests to a gymnast profile (name,dob,age,dob,coach, etc) either using PHP/MySQL or PHP/Ajax/MySQL or PHP/Javascript/MySQL.
In other words when I am running a report my system should be able to retrieve the following data
gymnast name, no. of tests this gymnast is doing each having units and points associated to it.
I am currently able to associate a gymnast with a particular test only without the units and points.
I appriciate all help given and welcome everyone how can give me an advise/solution/source code.
Here's a piece my code you get a better idea of my problem:
<form class = "create_profile" name = "add_gym" action = "create_GYMNAST_record.php" method = "post" onsubmit='return validateUserFormOnSubmit(this)'>
<p><h3>Create Gymnast Profile</h3></p>
<!--<fieldset><legend>Fill out the form to create a gymnast profile:</legend>-->
<table>
<p>Gymnasts Firstname: <input type="text" name="g_fname" size="15" maxlength="30"/></p>
<p>Gymnasts Surname: <input type="text" name="g_sname" size="15" maxlength="30"/></p>
<p>Gymnasts D.O.B (yyyy-mm-dd): <input type='text' name='birthday' id='birthday' size='15' maxlength='30' onBlur = "calcAge(add_gym)"/>
Gymnasts Age: <input type="text" name="age" id="age" size="3" maxlength="3" readonly="readonly"/></p>
<p>Gymnasts Height(cm): <input type="text" name="height" id="height" size="5" maxlength="5" onBlur="Calculate()"/></p>
<p>Gymnasts Weight(kg): <input type="text" name="weight" id="weight" size="5" maxlength="5" onBlur="Calculate()"/>
H/W Index:<input type="text" name="hw" size="5" maxlength="5" readonly="readonly" onBlur="Calculate()"/></p>
<p>Coach Firstname: <input type="text" name="c_fname" size="15" maxlength="30"/><p>
<p>Coach Surname: <input type="text" name="c_sname" size="15" maxlength="30"/><p>
<p>Club name: <input type="text" name="clubname" size="15" maxlength="30"/><p>
<?php
echo "<p>";
echo "Tests : <font id=tests><select>\n";
echo "<option value='0'>============</option> \n" ;
echo "</select></font>\n";
echo "Units : <font id=units><select>\n";
echo "<option value='0'>=== none ===</option> \n" ;
echo "</select></font>\n";
echo "Points: <font id=points><select>\n";
echo "<option value='0'>=== none ===</option> \n" ;
echo "</select></font>\n";
echo"</p>";
?>
<p><input type="submit" name="Submit" value="CreateRecord" onclick = 'return showMessage()'>
<input type="reset" name = "clearForm" value="Reset" onclick = 'return formReset()'/></p>
Thank you in advance.
FSManiaKa