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
that script above grabs the URL and displays it so it would automatically put 27 in the Script. As below
the problem is its a php in a php
See >>>
Anybody got any ideas ?
<?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: