• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

[PHP] Showing up in pages

ducktape

NLC
NLC
I have a seperate script for ratings from my main pages. I need to display the rating thing on each page. What needs to be done is i have a part in my database called "post_id" which stores the number of the rating id. Below is a snippet of the pages im trying to call to the site. All it does is show a zero so i need to call the $post_id dynamically. Currently all it shows is 0

http://neonsonline.com/nom/nom.php?id=26 the feedback part

PHP:
echo "<p>
<table cellpadding='3' cellspacing='0' width='100%' border='0' class='main'>
<tr>
<td width='100%'><img src='/nom/images/feedback.gif'></td>
</tr><tr>
<td height='1' width='100%' bgcolor='#1365B1'></td>
</tr></table><p>";
include "http://neonsonline.com/ratings/ratecodes.php?id=$post_id&form_style=2&source=$PHP_SELF";

echo "<p>";

include "http://neonsonline.com/ratings/ratecodes.php?id=$post_id&display_style=1";

echo "<p>";

include "http://neonsonline.com/ratings/ratecodes.php?id=2&votes=total";

echo "<p><center>";
 
First off, use $_SERVER['PHP_SELF'] instead of $PHP_SELF. Second, can you post the sql query that gets the rating.
 
Back
Top