Page 1 of 1
Help needed ! creating ratings or reviewing
Posted: Tue Jul 12, 2005 2:52 am
by burnhallian
Hello All,
Im new in this forum as well as new to PHP. I found PHP very robust. im supposed to create a page where in a user is asked different questions and then with the help od radio buttons he selects based on rating of 1 to 10. then once he submits, the average of rating 10 questions is given. can anyone help me in it. I dont know how to do that ? is ther eany avaiable code for that ?
Hope to see replies from people around.
regards
Posted: Tue Jul 12, 2005 6:17 am
by patrikG
moved to PHP Code.
burnhallian, please make sure you post in the correct forum.
Posted: Tue Jul 12, 2005 9:46 pm
by burnhallian
sorry for that !! didnt know the rules.
Anyways...any replies to my post ? im eagerly waiting
Posted: Tue Jul 12, 2005 10:38 pm
by Burrito
take the results of the 10 quesitons add 'em all up, pour some salsa and guac on them and divide by 10.
ex:
Code: Select all
$result = 0;
$result += $_POST['result1'];
$result += $_POST['result2'];
$result += $_POST['result3'];
$result += $_POST['result4'];
$result += $_POST['result5'];
$result += $_POST['result6'];
$result += $_POST['result7'];
$result += $_POST['result8'];
$result += $_POST['result9'];
$result += $_POST['result10'];
// add salsa and guac here...
$result = ($result / 10);
echo $result;
Posted: Tue Jul 12, 2005 11:56 pm
by burnhallian
thanx man for ur prompt reply. Actually im very new to PHP so dont know much about it. i some how managed to write the code below, got some from books, net etc. Kindly see wether im doing ok or not. The code is below. Now what i need to do is that i take the values submitted and then i just add up the values. Can u plzz tell me what to do and how do i take the values from the code and do i need to write that in the new file analysis.php. Thanx in advance
" Sorry for the long code !! im removing it "
Posted: Wed Jul 13, 2005 12:21 am
by Burrito
waaaaaaaaaay too much code there for me to read that's not in php tags, the non-color hurts my eyes...please use php tags when posting code. Read
here for info on posting code in the forums.
basically you'll just use what I posted above only you'll replace the result# var with your form vars:
dev, max, disad etc...
Posted: Wed Jul 13, 2005 2:56 am
by burnhallian
thanx a lot man !! it worked ...
Keep up the good work

Posted: Wed Jul 13, 2005 6:16 am
by dreamline

Take a look at my sig, go there and you'll find a rating system...

Is that the sort of thing you were looking for? However i am using a popup for the rating system...

Posted: Thu Jul 14, 2005 9:20 pm
by burnhallian
thanx anyways .. i did it ! This forum is very much helpful
