Math using php

7 posts by 2 authors in: Forums > CMS Builder
Last Post: June 13, 2012   (RSS)

Re: [s2smedia] Math using php

By Jason - June 13, 2012

Hi,

No problem. Do you have a PHP file that is currently outputting the star information without the rating? If so, could you please attach that file? That way we can give you a much more concrete example.

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Math using php

By s2smedia - June 13, 2012

yes absolutely..

heres link:
http://hubfox.com/test/profile.php
the stars are coded.. but the Rating is hard coded.

file attached

thanks!!!!

Re: [s2smedia] Math using php

By Jason - June 13, 2012

Hi,

Your attachment didn't come through. Could you please try sending it again?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Math using php

By s2smedia - June 13, 2012

sorry ;)
Attachments:

profile_007.php 20K

Re: [s2smedia] Math using php

By Jason - June 13, 2012

Hi,

Give this a try:

<tr>
<td height="40" align="left" valign="middle" class="ash">Integrity Level</td>
<td width="35%" align="left" valign="middle"><div id="meter"><div style="background-color:#71B10E; height:10px; width:36px"></div></div></td>

<?php
$starTotal = intval($memberRecord['professionalism']) +
intval($memberRecord['communication']) +
intval($memberRecord['quality']) +
intval($memberRecord['expertise']);

$rating = ($starTotal / 25) * 100;
?>

<td width="29%" align="left" valign="middle"><?php echo $rating;?>%</td>
</tr>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Math using php

By s2smedia - June 13, 2012

PERFECT!!!!!
thank you sooo much