ip address in form

admin

Administrator
Staff member
Why doesnt this form work?<br />
<br />
Code:
<FORM name="FO" action="http://192.168.14.253/cgi-bin/test.cgi" method="post"><br />
    <P><br />
    <LABEL for="id">ID: </LABEL><br />
              <INPUT type="text" name="id"><BR><br />
    <LABEL for="password">Password: </LABEL><br />
              <INPUT type="text" name="password"><BR><br />
    <INPUT type="text" name="IPaddress" value="<!--CODE: $ENV{REMOTE_ADDR} -->"><br />
    <INPUT type="submit" value="Send"> <INPUT type="reset"><br />
    </P><br />
 </FORM>CODE] <br />
<br />
It just shows "<!--CODE: $ENV{REMOTE_ADDR} -->"  in the form input box. I want the IP address shown there. Can someone help me?<br />
<br />
<br />
thanks in advance<br />
<br />
<br />
greets,<br />
<br />
prinski<!--content-->can someone tell me how i can access my ip adres with javascript code or so? <br />
<br />
what i need is that a client surfs to a website. There is some client side scripting (javascript e.g.) which fetches the ip address (locally) and sends it via a form to a CGI.<br />
The CGI i have already. can someone give me information about how to fetch the ip address in javascript?<br />
<br />
<br />
thanks alot.<br />
<br />
<br />
prinski<!--content-->Your best bet would be to get the IP from the request with the form is submitted -- no client stuff required.<!--content-->yes,<br />
<br />
but i really want to have the local ip address. with that solution you might have an ip of some nat server in between.<!--content-->You might want to check out this page (<!-- m --><a class="postlink" href="http://www.webdevfaqs.com/php.php#getip">http://www.webdevfaqs.com/php.php#getip</a><!-- m -->). If you can't use SSI, PHP, ASP, or any other server-side technology, then you're out of luck, AFAIK.<!--content-->thats not what im looking for (it will give ip address of the nat server in between if nat is used).<br />
<br />
perhaps i did not explain enough.<br />
<br />
What i want is to put the ip address é—Š
 
Back
Top