i have been given a script which requires that the php.ini file has global variables set to on:
function go_url() {
global $default_dbname, $directory_tablename;
global $url_id, $url;
if(isset($url_id) && isset($url)) {
if(!$link_id) $link_id = db_connect($default_dbname);
$result = mysql_query("UPDATE $directory_tablename SET hit = hit + 1 WHERE url_id=$url_id");
if(!$result) error_message(sql_error());
header("Location: $url");
exit;
}
}
how do i change this script to work with a php.ini file that has global variables set to OFF? i understand that the "global" part of the coding must be deleted but i am unsure of how it should be replaced. many thanks for any help as i am an utter n00b.