Hi,
I want to make an option in my database that lets users rate a certain record in the database. For that I created three fields: number of rates, total of rates and average rate. Now I wrote a php3 script that i call from the view results in this php script i call the modify record form. I want to modify the rate total by adding the rate of the user to it. My idea was to create a variable rate and to make something in db.cgi to add that rate to the total and 1 to the number of rates and calculate a new average for that record, but I don't know how to do that. Also when i call the modify_form_record sub from the php script i get an error unable to modify record/can't find requested record. All the fields are filled in by the php script though and when I press submit it will do it while nothing has changed. Can anybody help me a step further?
Thanks in advance, SeP
I want to make an option in my database that lets users rate a certain record in the database. For that I created three fields: number of rates, total of rates and average rate. Now I wrote a php3 script that i call from the view results in this php script i call the modify record form. I want to modify the rate total by adding the rate of the user to it. My idea was to create a variable rate and to make something in db.cgi to add that rate to the total and 1 to the number of rates and calculate a new average for that record, but I don't know how to do that. Also when i call the modify_form_record sub from the php script i get an error unable to modify record/can't find requested record. All the fields are filled in by the php script though and when I press submit it will do it while nothing has changed. Can anybody help me a step further?
Thanks in advance, SeP