rather hard question

geekazoid

New Member
I have a rating system and i would like each individual page to have an individual rating system.

<?php rating_bar('1'); ?>

That above is the script for the system and the number ('1') is the reference to the individual script which needs to be a number

So if i was to have a page labeled 27.php i could link it to that script using this one

PHP:
<?php
$full_uri = $_SERVER['REQUEST_URI'];
$uri_parts = explode(".", $full_uri);
$what_you_want = $uri_parts[0];
$what_you_really_want = substr($what_you_want, 1);
echo $what_you_really_want;
?>

that script above grabs the URL and displays it so it would automatically put 27 in the Script. As below

PHP:
<?php rating_bar('27'); ?>


the problem is its a php in a php
See >>>

PHP:
<?php rating_bar(']<?php
$full_uri = $_SERVER['REQUEST_URI'];
$uri_parts = explode(".", $full_uri);
$what_you_want = $uri_parts[0];
$what_you_really_want = substr($what_you_want, 1);
echo $what_you_really_want;
?>'); ?>


Anybody got any ideas ?
 
Last edited:

ISDProductions

New Member
i don't understand your problem? Do you just need to not have php inside php?

just erase the second set of <?php ?>

so that the first line of you script reads <?php

and the last line reads ?>

you do not need to call php after you call php?

or in other words. Once you call php with <?php

you are in php until you end it with ?>
 
Top