include function being weird?


Posted on 16th Feb 2014 07:03 pm by admin

I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it outputs a 1 at the end!!
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
<font style="color:#333;">IP Address to Analyse:</font> <input type="text" value="<?php echo include('./disp_ip.php'); ?>" size="20" maxlength="20" name="IPaddr"><br />
<input style="color:#333;" type="submit" value="submit" name="submit">

Is the code, note NO 1. Disp_ip.php has this simple code:
<?php echo $_SERVER['REMOTE_ADDR']; ?>

Yet I get this insanely weird result?
<input type="text" name="IPaddr" maxlength="20" size="20" value="64.180.2.2341"/>

Where on earth is this 1 coming from? it appears EVERY time I echo disp_ip.php

No comments posted yet

Your Answer:

Login to answer
170 Like 20 Dislike
Previous forums Next forums
Other forums

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

Save data in input fields when they press "BACK BUTTON"
Hi, this is html form: And let's say they get a error "Please enter ur title must be more then

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

Structure Question - One Table or One Table Per Record Set?
I have a web app (mySQL and PHP) which allows people to create an item with up to 200 records which

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

setcookie and isset($_COOKIE(name)) seem very finnicky.
I'm currently playing around with a user system with login and registration. I'm trying to use cooki

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash