Fixed(read the last post.you'll laugh, I know it:) )
Moderator: General Moderators
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
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..
HOLY HELL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You all will NEVER believe me..never..nope.not a damn chance in hades..i put this before my include statement..
Code: Select all
echo ("workng");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;
}
}
}-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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):
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"- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm