Hi.. i was wondering if anyone could help me:-
I am trying to display the results of one subject from a table to the web site!
my table name is 1234_result and at the moment i can display all subjects and results on the page when the user inserts the "1234" into an id field. This is the query i use.
$query = "SELECT subj, teacher, testType, result FROM " . $_POST ['id'] . "_result";
now i would like to go one step further, when the user logs in using "1234", i want there to be a field to select subject, which will then display that subjects results only from the "1234_result" table.
not sure if im explaining myself very well..
my idea is its something on the lines of this:-
$query = "SELECT subj, result FROM " . $_POST ['id'] . "_result where subj = " . $_POST['subj'];
Not sure exactly..
Any ideas??
Thanks,
Susi.