Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

send url in form to mail

0 views
Skip to first unread message

steve

unread,
Nov 17, 2004, 9:16:48 AM11/17/04
to
Hi all

How can I achieve that

For example I have 100 pages in each page I have a link "Contact Us"
which it take you to contact.htm and there I have a form that use php
to send the data to my email "form to mail".
That all work fine but I want to know from which one of this 100 pages
the visitors have click the "contact us" link and this url to be email
to me whit the other data in the form.

Hope you guys understand me what I mean.


Antonio P.

unread,
Nov 17, 2004, 9:48:52 AM11/17/04
to
put a variable in every "contact us" link with the page url $PHP_SELF, catch
it in the form as an hidden field to send to your email.


"steve" <nos...@nospam.non> ha scritto nel messaggio
news:cnfmfd$g73$1...@ctb-nnrp2.saix.net...

Newsgroup Poster

unread,
Nov 17, 2004, 9:48:30 AM11/17/04
to
do a hidden field and have it as a referal using php
"steve" <nos...@nospam.non> wrote in message news:cnfmfd$g73$1...@ctb-nnrp2.saix.net...

Antonio P.

unread,
Nov 17, 2004, 10:05:21 AM11/17/04
to
referal not always work some firewall stop browser sending for example
norton firwall

"Newsgroup Poster" <dont...@my.address.ok> ha scritto nel messaggio
news:cnfobv$ajk$1$8302...@news.demon.co.uk...

steve

unread,
Nov 17, 2004, 10:06:00 AM11/17/04
to
Can you please give me a example of referal using php

"Newsgroup Poster" <dont...@my.address.ok> wrote in message
news:cnfobv$ajk$1$8302...@news.demon.co.uk...

steve

unread,
Nov 17, 2004, 10:07:38 AM11/17/04
to
Can you please give me some example of that

"Antonio P." <antonio...@fastwebnet.it> wrote in message
news:MwJmd.13389$n%2.7...@tornado.fastwebnet.it...

Antonio P.

unread,
Nov 17, 2004, 10:23:07 AM11/17/04
to
page from where u come:
<a href=contactus.php?my_ref=<?php echo $PHP_SELF ?>>Contact us</a>

page where is the form:
<input NAME="my_ref" TYPE="hidden" ID="my_ref" VALUE="<?php echo
$_GET['my_ref']?>">

"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cnfpen$lc4$1...@ctb-nnrp2.saix.net...

Antonio P.

unread,
Nov 17, 2004, 10:38:40 AM11/17/04
to
the page where is the form is the contactus.php


steve

unread,
Nov 17, 2004, 11:15:48 AM11/17/04
to
correct
but it does not paste the value to the next url
www.a r z i k e.com/test.php


"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:tfKmd.13464$n%2.9...@tornado.fastwebnet.it...

Antonio P.

unread,
Nov 17, 2004, 11:22:58 AM11/17/04
to
in witch next? the contactus.php where is the form or in the page that send?

"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cnfteh$svv$1...@ctb-nnrp2.saix.net...

steve

unread,
Nov 17, 2004, 11:30:37 AM11/17/04
to
in contactus.php

the form send me just a blank field
my_ref:


"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:%UKmd.13578$n%2.5...@tornado.fastwebnet.it...

Antonio P.

unread,
Nov 17, 2004, 11:43:47 AM11/17/04
to
so tell me if i understood
u put this in the page with the contact link:

<a href=contactus.php?my_ref=<?php echo $PHP_SELF ?>>Contact us</a>
and it comes.

in the page contactus.php u put
<form NAME="formname" METHOD="post" ACTION="contactus.php">


<input NAME="my_ref" TYPE="hidden" ID="my_ref" VALUE="<?php echo
$_GET['my_ref']?>">

.
.
.
</form>

and in the part of contactus.php send the mail u retrive the my_ref value as
$POST['my_ref']

and it dont comes?
u need to describe detailed otherwise i cant help u

"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cnfuaa$1fv$1...@ctb-nnrp2.saix.net...

Antonio P.

unread,
Nov 17, 2004, 11:46:56 AM11/17/04
to
when u click on the contact us link u go on the contacus.php page look in
the html code and look if u find the hidden field full or empty
and maybe is better if u post the code


"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cnfuaa$1fv$1...@ctb-nnrp2.saix.net...

Daedalus

unread,
Nov 17, 2004, 11:48:09 AM11/17/04
to
The page containing the link to contacus.php:

<a href=contactus.php?my_ref=<?php echo $PHP_SELF ?>>Contact us</a>
must also be a php file to able to echo $PHP_SELF.


Dae


"steve" <nos...@nospam.non> wrote in message

news:cnfuaa$1fv$1...@ctb-nnrp2.saix.net...

Antonio P.

unread,
Nov 17, 2004, 11:54:10 AM11/17/04
to
> and in the part of contactus.php send the mail u retrive the my_ref value
as
> $POST['my_ref']
sorry is $_POST['my_ref']


steve

unread,
Nov 18, 2004, 7:04:04 AM11/18/04
to
it is empty
<input name="rurl" type="hidden" id="rurl" value="">


"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:sfLmd.13627$n%2.8...@tornado.fastwebnet.it...

steve

unread,
Nov 18, 2004, 7:12:03 AM11/18/04
to
Correct
I have it the same

but after I click <a href=contactus.php?my_ref=<?php echo $PHP_SELF
?>>Contact us</a>
and if I look the html in the next page "contactus.php" the value is
not there
<input name="my_ref" type="hidden" id="my_ref" value="">


"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:vcLmd.13619$n%2.1...@tornado.fastwebnet.it...

steve

unread,
Nov 18, 2004, 7:13:50 AM11/18/04
to
it is a php file


"Daedalus" <arsenaul...@videotron.ca> wrote in message
news:301dkjF...@uni-berlin.de...

Antonio P.

unread,
Nov 18, 2004, 7:21:02 AM11/18/04
to
when u mouseover the contact links in the status bar do u see the value
?rurl=....?

"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cni3hf$d4m$1...@ctb-nnrp2.saix.net...

steve

unread,
Nov 18, 2004, 7:27:24 AM11/18/04
to
I see
url......../contactus.php?my_ref=


"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:9s0nd.208$C94...@tornado.fastwebnet.it...

Antonio P.

unread,
Nov 18, 2004, 8:06:04 AM11/18/04
to
ok then first replace $PHP_SELF with $_SERVER['PHP_SELF'], after or u put
everywhere my_ref or rurl not a mix in some page my_ref and in some other
rurl

"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cni4e7$enl$1...@ctb-nnrp2.saix.net...

steve

unread,
Nov 18, 2004, 8:47:15 AM11/18/04
to
thanks
that work just fine
I whish the word where full with helpful people like you.

When we are still in php waves how do I paste a value from url to a
form text field
In my url I have /ndex.php?REQ=some+text
and I have try
<input type="text" name="search" value="<?php
$REQ = $_GET[REQ];
?>">

but it does not really work
what is the correct way to achieve that

Once more Thanks for all your great help.

"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:p61nd.287$C94...@tornado.fastwebnet.it...

Antonio P.

unread,
Nov 18, 2004, 8:57:27 AM11/18/04
to
<input type="text" name="search" value="<?php echo $_GET[REQ]; ?>">


steve

unread,
Nov 18, 2004, 9:27:08 AM11/18/04
to
Ops
the form is in the heather.html and the main code is encrypted so I
can not change it to heather.php
is there some other way that I can achieve that or should I just live
with it


"Antonio P." <antonio...@fastwebnet.it> wrote in message

news:zS1nd.387$C94...@tornado.fastwebnet.it...

steve

unread,
Nov 18, 2004, 2:38:09 PM11/18/04
to
once more thanks for all your help
I have about 400 htm files that I need to convert to .php file so the
script to work
can you maybe recommend some program that will do that automatically
for me
something similar like the option "find and replace"

Antonio P.

unread,
Nov 18, 2004, 6:19:26 PM11/18/04
to
macromedia dreamweaver convert all the links in a website if a filename is
changed
if u need just to raname the file u can use "Batch Rename"


"steve" <nos...@nospam.non> ha scritto nel messaggio

news:cnitls$2k5$1...@ctb-nnrp2.saix.net...

0 new messages