php_self

Status
Not open for further replies.

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
I have a ad-free account and i would like to ask if is working the php_self script if a have the Intermediate PHP Configuration

It is because it was working before and now it is stuck.Im using it for counting how many times was viewed the page.
Any ideas?
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
I would help if I understood the question. the PHP_SELF variable is not a script, you have the intermediate lvl php (which I think you said but your english is not clear)..
 

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
here is the code\
<?php
include ("connection.inc.php");
$connection = connect();
$page=$_SERVER["PHP_SELF"];
$ip=$_SERVER["REMOTE_ADDR"];
$date=time();
$query="INSERT INTO tracker(page,ip,date) VALUES ('$page','$ip','$date')";
mysql_query($query,$connection);
$query="SELECT count(*) FROM tracker WHERE page='$page'";
$result=mysql_query($query,$connection);
$views=mysql_result($result,0,"count(*)");
echo "This page has been viewed$views times";
?>
 
Last edited by a moderator:
Status
Not open for further replies.
Top