barrowvian Posted August 19, 2008 Share Posted August 19, 2008 Hey all, Pretty new to this forum and to fairly new to php in general. I have a lot of reading/video material to go through but thought I would post my overall goal in here for some support as to how difficult this would be to produce and what are the main focus areas to study. Very keen to get stuck into learning php – mainly just as a hobby. I’ve been learning about php and mysql database connectivity so pretty comfortable with that now. I have a basic mysql table which contains the following fields; Student_id primary key not null int 3 Course_name not null varchar 50 Attendance not null int 3 Grade not null varchar 3 Ive populated the table with some basic info to have a play around with; the info is as follows; 001 computing 100 1.0 002 computing 100 2.1 003 computing 50 3.0 004 sports 100 2.1 005 sports 80 2.2 006 sports 40 3.0 Please see my “very simple” design of what I’m looking to produce for my own personal project that I have set myself. What I want to do is have a variety of list boxes 1, 2a, 2, 3 and 4 which contain values of what can be related to that of the data within the database. For example, list box 1 would contain “computing”, “sports” and “all”. Box 2a would contain “>, <, = , >=, <=, between”. Box 2 would contain a value ranging from 10%, 20%, 30% ..... 80%, 90% and 100%. If the “between” option was selected from 2A then list box 3 would be visible and the user could select which values they want. I’d like to implement some validation here so that the user couldn’t select > 100% or between 40% and 30% (ie the larger of the two values would have to be in list box 3). Finally the user would select a grade to query from too. I would also like to have it flexible so that the user can make selections by not having to use all of the list boxes. For example, the user can select the course and the attendances, or the course and the grades – but they always have to select the course to query from. After the selection process has been completed then I would like to display the data in area 5. It would just be based on the number of records selected. For example if the query was SELECT * FROM table WHERE course = ‘computing’ AND attendance = 100 then it would echo a statement along the lines of “there are ‘2’ records with this criteria”. If the option of “all” had been selected from listbox 1 then it would display both sets of results as though it had done a comparison between computing and sports. I hope I haven’t made it sound too confusing. I realise that it probably way out of my league to create something like this easily but any help would greatly be appreciated. Im ideally looking for some pointers of what to look into, what kind of functions/statements I’d need etc etc. Anything and everything Link to comment https://forums.phpfreaks.com/topic/120423-pretty-new-to-php-help-needed-for-personal-learning-project/ Share on other sites More sharing options...
MatthewJ Posted August 19, 2008 Share Posted August 19, 2008 Most of the selection options will be client side (showing fields based on one fields selection, etc.) and would require something like Javascript. As for handling the query, that is just a matter of coding elegantly for all the scenarios you wish to allow. Hope that helps get you started! Link to comment https://forums.phpfreaks.com/topic/120423-pretty-new-to-php-help-needed-for-personal-learning-project/#findComment-620541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.