You are here: Re: URL of Referring html Document « PHP Programming Language « IT news, forums, messages
Re: URL of Referring html Document

Posted by Peter on 11/19/18 11:47

Hi NC, I tried the $_SERVER['SCRIPT_URI'] but it returns NULL. E.g I
have an html page with a form like this:

<form action="refer.php" method="post">
<p>First Name</br><input type="text" name="name" size="20"
maxlength="40"/></p>
<p><input type="submit" name="submit" value="Send Message"/></p>
</form>

And then this is my php code:

<?php
$refer = $_SERVER['SCRIPT_URI'];
echo $refer;
?>

But it comes back blank.

I would like it to return the full html URL like the HTTP_REFERER does
but seems that it is not to be relied on.

I think it will be best to use a hidden form on each page that contains
the URL and the just get this.... for reliability.

It's just that I have to then edit each page individually to add the
hidden value.

Thanks a lot though!

Pete.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация