Page 3 of 3
Posted: Tue Sep 20, 2005 8:35 pm
by Jenk
Have you tried echoin all the var's during the loop?
add extra echo's at various stages so you can see the pattern/flow.
Posted: Tue Sep 20, 2005 8:35 pm
by Charles256
okay.i'll look into tha tlater...but that if statement still isn't executing:-D that's the main issue:-D
Posted: Tue Sep 20, 2005 8:41 pm
by Jenk
Find out if the var is being set correctly first

Posted: Tue Sep 20, 2005 8:47 pm
by Charles256
here comes the results of echos at every stage of the foreach loop

Did I mention I love y'all for trying to help? Lord knows this is driving me mad..
HOLY HELL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You all will NEVER believe me..never..nope.not a damn chance in hades..i put this before my include statement..
just to make sureit was reading the URL for process='yes', I was curious, ya know?
well I hit refresh and holy hell the entire thing worked........I go back and take all the error checking out..still works... :: laughing his butt off because this makes no sense:: I am sorry if I frustrated anyone..I have no idea why it works..here's hte code that's working..I beieve its the same as the old code..
Code: Select all
foreach ($_POST as $key=>$value)
{
if ($key!='Register')
{
if (empty($value))
{
${"form_" . $key} = "<font color='RED'>Please enter something here.</font>";
$Error=1;
}
}
}
Posted: Tue Sep 20, 2005 8:52 pm
by feyd
maybe it was a weird caching problem?
Posted: Tue Sep 20, 2005 8:53 pm
by Charles256
over two computers and like 5 browsers? possible but unlikely..i'm blaming it on my host personally..

Posted: Tue Sep 20, 2005 9:08 pm
by feyd
it's possible your ISP may be caching the data, or something as well...
Posted: Tue Sep 20, 2005 9:11 pm
by Charles256
two different locations.one computer at work

one at my house:-D i'm not trying to be difficult but you seem pretty knowledgable and I figure if I keep putting out replies you might come up with a reason

I'm curious myself. I think the fates are conspiring against me but that's just me.
Posted: Wed Sep 21, 2005 3:42 am
by Jenk
I would of guessed cache aswell.. but maybe there was a corruption with the PHP installation on the host machine, and they have fixed/reinstalled it without telling you? :p
Posted: Wed Sep 21, 2005 5:46 am
by Chris Corbyn
We've (work colleagues) have had the most random issues like this too.
The PHP code was behaving completely differently based purely upon the position of a comment in the code
It's not even like we were moving to a different part of the code... we were just moving the comment like one tab into the page or one blank line down and the whole script was going crazy, giving different outputs.
We even then copied and pasted into a fresh file and were still seeing it. I can't remember exactly what was happening but it baffled the hell out of use for ages and to this day I still can't work out why it was doing it.
It's was literally like this (only in a big application):
Code: Select all
$var1 = 2;
//Set a variable to 3
$var2 = 3;
echo $var1 * $var2; //outputs something wacky like "5"
Code: Select all
$var1 = 2;
//Set a variable to 3
$var2 = 3;
echo $var1 * $var2; //outputs correct result "6"
Posted: Wed Sep 21, 2005 5:54 am
by n00b Saibot
d11wtq wrote:we were just moving the comment like one tab into the page or one blank line down and the whole script was going crazy, giving different outputs.
seems like special effects of a liquid plugin called
Tequila Sunrise 
Posted: Wed Sep 21, 2005 7:44 am
by Charles256
so i think i'm going to chock this one up as a learning experience.. lesson learned: my host just had a hell of a lot more fun with me than anyone has rights too;)