Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





$HTTP_REFERER Not Working On Index Page


I'm using $HTTP_REFERER in various parts of my site and it works well. When I use $HTTP_REFERER on my index page to see where members are coming from before they log into my site it won't work. Perhaps this has something to do with the previous page being from an outside site?




View Complete Forum Thread with Replies

Related Forum Messages:
Links Stopped Working - Use PATH/index.php?p=PAGE In My URL
i have just moved my website from one server to another, on the first my pages worked perfect (not considering markup) but now my links just won't work anymore...

i use PATH/index.php?p=PAGE in my URL, it worked well on the other server, but after i switched it just stopped working...

and i have no clue where to find the error... it just keeps showing the first page...

View Replies !
(Notice) Undefined Index: HTTP_REFERER
I have a site that logs each visitor's IP address and the referring site they came from for statistics. I am gettig the following error every time someone logs in:
(Notice) Undefined index: HTTP_REFERER

Any reason why this would happen? Could it because there is no referrer? The code I use to get this is:

$query = "insert into statistics
(page, time, referrer, browser, ip, timeStamp) values
('$_SERVER[REQUEST_URI]', now(), '$_SERVER[HTTP_REFERER]', '$_SERVER[HTTP_USER_AGENT]', '$_SERVER[REMOTE_ADDR]', now() )";

$result = mysql_query($query);

View Replies !
Index.htm Going To Login Page And Sending Back To Index Page
1: A visitors visits a.html page. decides to login and post comment. goes to login page and logs in then I want to send him back to a.html page how do I do that? Here is my login page and login.php page.

2: Same as above but I want to send them back after some time... while I make them view the error, why they have not been able to login. Code:

View Replies !
$_SERVER['HTTP_REFERER'] Not Working!!!
im trying to record a referring URL into a database to act as part of a web statistics facility on a web project that i'm doing however strangely the '$_SERVER['HTTP_REFERER']' function will only record referring URLs from my website and not from others.

For example if i have been to www.google.com and then navigate strait to the web page on my website which records the referring address, nothing gets recorded and the database record is left blank. All other data is successfully written to the database however and it is not a problem with variables etc as like i have already said, it will record web URLs from my website.

View Replies !
$_SERVER['HTTP_REFERER']; Not Working For All Sites
I have used $_SERVER['HTTP_REFERER']; in my web page, to check the referrer site url.

It work for some websites, Not for many.

Even i used $_SERVER to list all the server variables, but not getting HTTP_REFERER variable.

View Replies !
IE Not Working $_SERVER['HTTP_REFERER']; But Firefox Does
Here is my code for interstitial ad code im creating:

(This appears at the top of the website, to create a cookie and redirect if the cookie is not on their computer)

<?
if(!empty($_COOKIE['hh411ads']))
{
#setting cookie if not set
}else{
#create the cookie
setcookie ("hh411ads", "interstitial", time()+43200);
#send to interstitial
?>
<SCRIPT LANGUAGE="JavaScript">
window.location="http://www.hh411.com/network/interstitial.php";
// -->
</script>
<?
}
?>

------------------------------
And this is the code for my interstitial.php:
--------------------------------

View Replies !
Index.php Is Not Working
I'm new to PHP. I designed a PHP webpage using DreamWeaver & then simply add the code below:

-------------------------
<html>
<head>
<title>HELLO WORLD</title>
</head>
<body>
Welcome World !!!
</body>
</html>
-------------------------

But when I tried to explore the page over my server, it showed nothing. Then I wraped my code with [ <?php and ?> ] but its still useless. what's wrong ?

I did not use any PHP coding in the page, its simple html coding. But I saved the page as Index.php using dreamweaver.

View Replies !
Mysql_fetch_array Index Not Working
I'm doing this:

<?php
$var = $row['title_en'];
?>
that works perfectly and fetches from the fieldname named: title_en

now I do this:
<?php
$lang = 'en';
$var = $row['title_'.$lang];
?>
it doesnt work

so i try this:
<?php
$var = $row["title_$lang"];
?>still doesn't work

my goal is to call the fieldname: title_en using the variable $lang which equals: en p.s. I have also echoed out $lang, and it does indeed equal: en

how do I do it?

View Replies !
How Do Methods $_SERVER['HTTP_REFERER'] And RewriteCond %{HTTP_REFERER} !^$ Differ?
1) How do methods "$_SERVER['HTTP_REFERER']" and "RewriteCond %{HTTP_REFERER} !^$" differ?

Specifically, does this description for $_SERVER['HTTP_REFERER'] also apply to the .htaccess RewriteCond %{HTTP_REFERER} !^$ method:

re: $_SERVER['HTTP_REFERER'] - The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. Code:

View Replies !
@header("Location: $HTTP_REFERER"); Not Working In Bedford
I have a weird problem. I have an add to cart link on a page which calls a page called AddCart.php with item ID as parameter. This page adds things to the database and then calls @header("Location: $HTTP_REFERER");

It works fine everywhere as far as I know, yet 2 people from Bedford, UK, have told me within 3 days that when they click on add to cart they get the IE standard 'Page unavailable' page. I have been over their IE configuration with one of them and it is configured exactly the same as me, where it works fine. Has anybody got an idea please?

View Replies !
HTTP_REFERER. Need To Capture URL Entered To Direct To Specific Page
I need to be able to capture the URL which the user has entered so that I may direct them to a specific page.

e.g. website is www.mainwebsite.com

However, I have several aliases for this website. If user enters www.specificsite.com (one of several aliases), I want to be able to capture that URL as a variable and open a specific page.

In this way, depending on the URL (alias) entered, I can direct visitors to specific pages on the site.

Is HTTP_REFERER the best way of doing this. If so,
what would be the code [I am not an experienced PHP programmer]

View Replies !
Page Redirection - Link Index.html Page To A .php Pag
I have an index.html page with a link to a .php page This is the complete code of the .php page Code:

View Replies !
Index.php Page
I just installed PHP 5.2.3. I'm trying to go to my index.php page by typing http://localhost/ but i'm just getting the listing of files in that directory.

View Replies !
A To Z Index Page
I'm trying to create an A to Z index page and i'd like to know how to make the query search for words starting with a letter. I want something like [A] [b] [C]....[X] [Y] [Z] and when the user clicks a letter all the words starting with that letter should be displayed.

View Replies !
Using Index.php As A Starters-page
when you type an URL it will always search for index.html. how can I change this, because my starterspage starts with index.php?

View Replies !
Will Google Index My PHP Page?
I'm building this forum, where its like Vbulletin (viewtopic.php&topic=xxx), and it displays the posts for those topics Will Google index my pages, if they are ALL php? They are all generated like that above.

View Replies !
Doesn't Like Index.php For Main Page
I've built a website and some of the pages are php pages (e.g. SomePage.php). It all works fine; both the html pages and the php pages come up and work just fine.

I then made a change to the main index.html file and made it so that it's an index.php file instead, and it has some php code embedded in it, not much different than any of the other php pages on my site.

But when I try to go to that index.php file, as the first file to bring up for the site, it fails to bring up the page but instead pops up an Open File dialog, asking if I want to Open or Save the index.php file. It's as if the server is not recognizing index.php as being a php file that needs the normal php pre-processing on the server side.

I used to get similar prpoblems with the other php pages before I had my server properly set up with Apache and php and such. But all of that is indeed properly set up. The OTHER php pages come up OK. It's just the very first, index.php page, that doesn't come up correctly.

What am I doing wrong?

View Replies !
Index.php?=page & Menu
I currently am new sorta in the php field. Basically I haven't really made my own php scripted site. So I am learning as I go.

I want to do something that shows like: www.mysite.com/index.php?=hosting

Then on the hosting page I would display my content.

Ho would I go about doing that and including a right and left side menu?

View Replies !
If Statement - Page = Index
What I'd like to do is, on my website on the initial page, the index, I don't want to link back to the index to be a link. If there is a:

If page = index then link not enabled
else link enabled

sort of possibility in php.

View Replies !
Index.php?page=somthing
I am wondering how people make sites that appears to have one document index.php and they navigate with index.php?page="somthing" I would like to implement this in my own site but I don't know how

View Replies !
Switch To Index Page
i am making awebsite that runs more a less from the index page so i am using for links.

<a href="index.php?=id">

switch ($HTTP_GET_VARS[id])
{
//default = news
default: include "news/news.php";
break;
//guides
case 'guides': include 'guides.php'
break;
//contact
case 'contact': include 'contact.php'
break;

View Replies !
Directory Onto An Index Page
I'm just looking for some simple code that will take the contents of a directory, say /junk and print them onto a page for me, like junk.htm, so my friends have easy access to files I post.

View Replies !
Solution For Redirect At Page Index
by php which the fast solution for make redirection at homepage ?
Time ago read some solutions, but one most fast because not load
or not make a reload of itself page, not remember
exactly but was a solution more fast...

View Replies !
Authentication - Get Redirected To The Index Page
I want people to have to go through my index page, so that if they try to go anywhere else, they get redirected to the index page. But once they click agree on the disclaimer, they can go everywhere. I assume this means sessions, but it might be something else, I'm not sure.

View Replies !
Index Page Query From PHP Newbie
index.html page I wish to have a link called "Today's message" that
contains a bit of PHP to fetch the message of the day.
I have this working from a daughter test page which has the extension .php.
When I implement this link from my Home Page I want the Home Page to still
be named index.html
How would I implement my desired operation?

View Replies !
MYSQL - Link To An Index Page
I'm working on a site which has several hundred articles stored in a MySQL database. On the bottom of the page are two links for the previous and next article. The site has been constructed in such a way that the database has fields containing the url of the previous and next pages (i.e. article.php?recordID=137) and these are pulled out of the DB in the form of links.

Rather than them having to add this to the DB every time a new article is added I'm trying to automagically do it in PHP. I've sorted the main part by taking the current article and either subtracting or adding it's ID by 1 to create the prev and next but I'm a bit stuck when it comes to the current (highest) article number. What I want it to do is link to an index page when there is no +1 (or -1 for the start).

View Replies !
Mod Rewrite - Not Opening The Index.php Page
I have mod rewrite working perfectly fom my main folder but I have another folder called admin with an index.php page in there with other pages.

I am having trouble with my mod rewrite so when I enter www.mydomain.com/admin/ it's not opening the index.php page within the admin directory Code:

View Replies !
Index Directly To My Home Page
I am using Apache server and would like the index file to open my home page that is in another directory. Using Dreamweaver site but do not want this to be visible.

View Replies !
PhpBB - Making A INDEX Page
phpBB - Making a INDEX page i need to make a index page with all the recent posted topics ok. http://srilankans.hugetop.com/forum thats my web site and i need to change the index from that to recent posted top 10 topics.

View Replies !
Creating A Custom Index Page
Is there any function that when given a directory name as its argument, returns an array containing the names of all the files in that directory, or all the directories in that directory, or both (as a multi-d array, I'd expect)?

I assume such a function could be used on the directory the php program running it is contained in, yes? (If yes, please be clear on how.) Code:

View Replies !
User Based Index Page
Both the users have same home page main.php.After logging with user1 only index1 page should be opened and with useer 2 only index2 page should be displayed. Code:

View Replies !
Multiple Index Page Work
I'm trying to figure out how/what this site is doing to have a dozen different index.php pages. All the pages are: domain-name.com/index.php=page-name I'm guessing that this is being done to gain some advantage in search engine results. Is this right.

View Replies !
Changing Pictures On Index-page When Reloading
I am a beginner but quite curious anyway.

My problem: I have seen websites that show different pictures whenever you enter the site. By doing this, the sites look always fresh and attractive and I like the idea a lot. Now I like to have the same function on my site but I do not know how that works...

Is there anybody who can give a good "explanation for dummies" on how to do that?

View Replies !
Display My Content Pages WITHIN My Index Page
Basically I have a layout index page. What I want to accomplish is display my content pages WITHIN my index page and I dont want to use iframes. Code:

<?php
if(strstr($id, "..") || $id[0]=="/") $id = "";
if(empty($id)) $id = "/home/vbd/public_html/home.html";
else { $id = $id . ".html"; }
if(is_file("$id")){ include("$id");
} else include ("404error.html");?>

I'm formatting my links like this: Code: <a href="index.php?id=news">News</a> And heres what's happening, the home page work as it should but none of the links are working.

View Replies !
Include() - Store The Text In The Index Page
I have a index.php page that has some text on it and I also have a edit_index page. From edit_index you can edit the text on the index page. But I don't want to store the information in a database or a text file but instead want to store the text in the index page.

Since the index page is PHP i made a variable at the top named $index_content and that holds the current text. What I want to have happen is for me to be able to, from edit_index, is edit the variable with the new text. So when I hit submit on edit_index I want it to call up index.php and redefine the $index_content variabled stored in the page. But i don't know how to write to a page like that when it's not apart of the script being executed.

I tried require(), but that didn't work, and I tried include() but that didn't work either. Is there some way to do this that i'm not aware of?

View Replies !
Blank Page Caused By Undefined Index
I upgraded my php from 4.4.7 to 5.2.4 and now the entire website doesn't work.  So I am trying to learn PHP and go through the site one error at a time.  If you have a idea why the upgrade caused the site to fail that would be great.

But in the meantime this is the problem i am stuck on.

I get this error now when transferring to a page

Notice - PHP Notice: Undefined index: REMOTE_ADDR in c:locationSession.php on line 45.

That line has the following code.

$GLOBALS["$SessionName"]=md5 (microtime() . $GLOBALS[REMOTE_ADDR"]);

Like I said this code worked before the upgrade.  Any idea what I can do to fix this problem?

View Replies !
Want My User To Have To Go Back To The Index Page As Soon As They Login.
I am having a little trouble intergrating a login/user management script with my html pages. I have used the div tag put in my php in there and put the rest of the php where it is originally placed in the script. Here is my problem.

I would like my user to stay on the same main page while the login part changes(goes to the members area). I have tried using i-frames but if there is a link in one, the main page does not change the i-frame does. Can this be solved with more php. I do not want my user to have to go back to the index page as soon as they login.

View Replies !
Index.php?page=download Vs Header An Footer
I've been programming for a couple of years, but still I'm not sure which is the best solution.

solution 1:

index.php?page=download
- here you call you index and it will load a page in it

solution 2

download.php

- here you load download.php and you load the menu etc with header.php

what do you think is the best solution? and why?

View Replies !
Find The File Name Of A Remote Site's Index Page
How do you find the file name of a remote site's index page using PHP...so, given that I have a domain name of www.yourSite.com, the file name might be:

index.php
index.htm
index.html
index.shtml
index.cgi
index.pl

.....etc., etc.... How do I figure out which one it is?

View Replies !
Does A Server Automatically Pickup Index.php As The Default Page
Does a server automatically pickup index.php as the default page in the same way as it would with index.html if the specific file is not defined?.

View Replies !
Use Files As Includes From My Index Page Where The Constant Is Defined.
Sample of code:

if (defined('constant')) {
   // show content
} else {
   header("HTTP/1.1 404 Not Found");
}

I am trying to do is, use files as includes from my index page where the constant is defined. What I want to happen is if a user trys to goto blah.php directly, instead of /index.php?page=blah they receive a 404 error, and are sent to the 404 file not found page.

View Replies !
Pressing The Submit Button Will Returned To The Index.php Page.
I am trying to build a cms , i am a beginner in php. I have a little chatbox ( i use include() in the index.php file ) and I need something llike this : after someone is pressing the submit button it will be returned to the index.php page.

View Replies !
How Do I Exit An Html Frameset As I Have A Link Which Has To Redirect Back To The Index Page?
I was just wondering in how do I exit an html frameset as I have a link which has to redirect back to the index page as shown below, which should not have the frames. header("location:index.php");

View Replies !
Notice: Undefined Index: Username In /home/spaodesi/public_html/preview/index.php On Line 23
Quote: Notice: Undefined Index: username in /home/spaodesi/public_html/preview/index.php on line 23 Quote:

Notice: Undefined Index: pass in /home/spaodesi/public_html/preview/index.php on line 24.

View Replies !
Two PHP Scripts On One Page Not Working?
I have two small PHP scripts running on a test page

Both scripts work perfectly when there is one script on a page. However, if I place two on the page (one above the other), the second script will not render. I get no PHP error messages - the script will just not render.

I think the PHP Scripts are OK as they were automatically generated by RSS Feed Burner and both do run separately.

There may be an issue with having separate calls of some kind on the page or my server might not be set right. I did a server test that I think shows that it is OK but I am not sure. The only think I have in my htaccess file for PHP is: "AddType application/x-httpd-php .htm .html" .

I am new to PHP and was wondering if anyone can see why both scripts will not run together?

View Replies !
Calendar Page Not Working (in IE)
I have been hard at work on this one and my computer broke so I haven't been able to resolve this problem for a bit, I open the webpage in IE and it doesn't show up but in FF it shows up just fine, anyone able to give me a hand on this one, it was working fine awhile back but now for some reason it seems to have broken. Code:

View Replies !
Flash Not Working On Page
I have inserted Flash animation on my page as normal (using Dreamweaver)- only it won't display in the browser for this site - which has various php/mysql pages on it - but this one is a simple html page - which displays the html - but not the Flash ?

The flash displays in the browser if I insert it into a page on another site - which does not use php/mysql.

Is it to do with the set up of the site which uses php/mysql ? - e.g. the fact there's testing server settings. My sites/servers are hosted remotely - and not on my own machines.

View Replies !
Session Not Working On Page 3
session ..cant get it to work on page 3 it will not display anyhting on page 3
whhat i do wrong Code:

View Replies !
Login Page Not Working
I have a database installed that can accept a csv file.
when I installed onto a new server, it wont upload.  is there anything obvious in the phpinfo that could be causing this? also, the login page wont work on this server.
just reloads the page again when submitting the user and pass Code:

View Replies !
Get Two Dropdown Lists Working On A Page
i am trying to get two dropdown lists working on a page. How do i go about this. For example, I have 1 table which holds countries and cities. When a user selects a country in the first dropdown list, i'd like the second dropdownlist populate with a list of cities etc. from my database.

View Replies !
Working With Dates On The Modify Page
I have a column in a table called testimonialDate. It is of type 'date'. When trying to modify a record, I can get it to display nicely on the modify page using:

$testDate = $testrow['testimonialDate'];
$testDate2 = strtotime($testDate);
$newdate=date("m-d-Y", $testDate2);

then <?=$newdate?>

However, when I change the displayed date and hit the modify button, it blanks out the testimonialDate column in the record selected.

I've found a lot of hints on the internet for displaying, but how do I send the info back up?
I'm also having issues trying to add a record. Typing in 3-3-2003 in text field results in 2003-3-20 in database.

Can I get some hints or a link to a good tutorial?

View Replies !
How Can I Get A Server To Show Index.php As It Would Index.html?
How can I get a server to show index.php as it would index.html? When I
save index.php it just shows the directory, I'm administrator of an
Apache Server and I'm not of a (I think, it's what www.awardspace.com
uses) a goDaddy server. Can anyone help me with this? Can it be done?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved