Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

embedded php in html, how to tell calling html file inside ?

General discussions related to php

Moderators: macek, egami, gesf

embedded php in html, how to tell calling html file inside ?

Postby cgchris99 » Mon Jun 30, 2003 1:30 pm

I have this piece of code inside a couple of my html pages

<script language="Javascript" type="text/javascript"
src="http://www.yourdomainhere.com/getrows.php"></script>

Is it possible inside the getrows.php to sell what the calling html page was.

if I use $SERVER_NAME.$PHP_SELF it returns the name of the php file. I need the name of the html it was called from.

Is it possible?

Thanks
cgchris99
New php-forum User
New php-forum User
 
Posts: 19
Joined: Sun Apr 13, 2003 7:23 pm

Postby liquedus » Mon Jun 30, 2003 3:26 pm

maybe HTTP_REFERRER is what you are looking for :?: :)
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Postby cgchris99 » Mon Jun 30, 2003 4:29 pm

Yes, http_referrer worked perfectly.

Thanks
cgchris99
New php-forum User
New php-forum User
 
Posts: 19
Joined: Sun Apr 13, 2003 7:23 pm


Return to PHP General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron