View previous topic :: View next topic |
Author |
Message |
Earle -
Joined: 10 Aug 2005 Posts: 2
|
Posted: Wed Aug 10, 2005 1:19 am Post subject: Notice: Undefined variable: |
|
|
I've read the other topics on this, and tried editing my php.ini to no avail.
My php.ini file can be read as a .txt http://68.56.153.72/php.txt there.
Basically you go to http://68.56.153.72/test/index.php and enter in the # of inmates you want input boxes for (1-35 or so).
I put in "2" w/o the "" in the input box and I get the error:
Quote: | Notice: Undefined variable: inmates in C:\Program Files\Abyss Web Server\htdocs\test\inmate.php on line 19
Notice: Undefined variable: inmatename in C:\Program Files\Abyss Web Server\htdocs\test\inmate.php on line 21
Notice: Undefined variable: inmates in C:\Program Files\Abyss Web Server\htdocs\test\inmate.php on line 24 |
I know this is not my code that is messed up because it works perfectly on other servers that aren't abuss.
The source code to my index and inmate.php can be viewed at:
http://68.56.153.72/inmate.txt and http://68.56.153.72/index.txt
PLEASE NOTE I have replaced all < tags with : so that the source would show.
I have abyss version1 the free one, and php 5 installed. When I do a file like $foo = "bar"; echo "$foo"; it outputs fine, it's just when I do form submitting it won't work unless I put $var = $_POST['var']; But I cannot do that with my system because the inmate boxes are dynamic. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Aug 10, 2005 1:33 am Post subject: |
|
|
You seem to have two php.ini files , look in your C:\Windows and PHP folder for
the php.ini files , delete the one thats causing your other settings from working.
Note: This error comes from PHP , it has nothing to do with the Server.
Sincerely , TRUSTpunk |
|
Back to top |
|
|
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Wed Aug 10, 2005 1:52 am Post subject: Re: Notice: Undefined variable: |
|
|
Earle wrote: | I've read the other topics on this, and tried editing my php.ini to no avail.
My php.ini file can be read as a .txt http://68.56.153.72/php.txt there.
Basically you go to http://68.56.153.72/test/index.php and enter in the # of inmates you want input boxes for (1-35 or so).
I put in "2" w/o the "" in the input box and I get the error:
Quote: | Notice: Undefined variable: inmates in C:\Program Files\Abyss Web Server\htdocs\test\inmate.php on line 19
Notice: Undefined variable: inmatename in C:\Program Files\Abyss Web Server\htdocs\test\inmate.php on line 21
Notice: Undefined variable: inmates in C:\Program Files\Abyss Web Server\htdocs\test\inmate.php on line 24 |
I know this is not my code that is messed up because it works perfectly on other servers that aren't abuss.
The source code to my index and inmate.php can be viewed at:
http://68.56.153.72/inmate.txt and http://68.56.153.72/index.txt
PLEASE NOTE I have replaced all < tags with : so that the source would show.
I have abyss version1 the free one, and php 5 installed. When I do a file like $foo = "bar"; echo "$foo"; it outputs fine, it's just when I do form submitting it won't work unless I put $var = $_POST['var']; But I cannot do that with my system because the inmate boxes are dynamic. |
Or you could use $_POST['inmates'] and $_POST['inmatename'] which should clear the notices. (Not actually sure, too lazy to test.) _________________
|
|
Back to top |
|
|
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Wed Aug 10, 2005 2:24 am Post subject: |
|
|
For all my scripts I use
Code: | if (isset($thevar)) {
$othervar = $thevar;
} |
That gets rid of the notice messages. _________________
|
|
Back to top |
|
|
Earle -
Joined: 10 Aug 2005 Posts: 2
|
Posted: Wed Aug 10, 2005 4:04 am Post subject: |
|
|
post #2 - That won't work because I have like 40 vars for inmate0 inmate1, all the way to inmate40, and there is no way to check if the inmate (isset) because it's not passing them correctly.
post #3 - I don't want to just hide the errors, I wanted to fix them.
post #1 - Thanks a million, I found a php.ini in C:\Windows that I didn't know about, replaced that with the one from my C:\PHP I had edited and it now works like a charm! |
|
Back to top |
|
|
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Wed Aug 10, 2005 4:24 am Post subject: |
|
|
Earle wrote: | post #2 - That won't work because I have like 40 vars for inmate0 inmate1, all the way to inmate40, and there is no way to check if the inmate (isset) because it's not passing them correctly.
post #3 - I don't want to just hide the errors, I wanted to fix them.
post #1 - Thanks a million, I found a php.ini in C:\Windows that I didn't know about, replaced that with the one from my C:\PHP I had edited and it now works like a charm! |
Could be done, just set $arraykey = "inmate".$incr and $_POST[$imcr] with $incr++ in the loop. Or a error_reporting(0) on the page =P _________________
|
|
Back to top |
|
|
|