|
Posted by Tamarin on 03/06/07 13:40
"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:op.toq6fjm8qnv3q9@misant...
Tamarin <tar@tam.com> wrote:
> Hello,
>
> new @ php and was wondering if I can pass on a PHP variable to Javascript
> for returning an IP number in a form. I use a PHP snippet below to
> advise
> potential members of a forum that their IP is being recorded (as all
> web-servers are capable of), but I am wondering if there is some way to
> pass
> the PHP variable to a hidden form-field variable that would return the IP
> number via the form processor?
echo '<input type="hidden" name="ip" value="'.$_SERVER{'REMOTE_ADDR'].'">';
Then again, that seems highly unreliable, what problem are you trying to
solve with this hidden form field?
--
Hi Rik,
tried including the line in my form, but no avail. I think I know not how
to integrate php & html, my form is writtin in html with a js form
validator.
what I am trying to achieve is to circumvent the normal PHPBB registration
form, and have prospective members fill in a customized HTML for
registration that I handle on a case-by-case basis. The form works fine in
showing the "image" of the visitors IP, but I just don't know how I can have
the IP sent to me as part of the form. Normally, PHPBB (an open-source
server-side bulletin board) collects IP's for new members when they register
and when they post messages.
I'm sure this is a fairly elementary thing, but I'm mainly an HTML coder,
even javascript makes me go crazy!
thanks,
Tam
Navigation:
[Reply to this message]
|