Page 1 of 1

Errors in Code

Posted: Fri Jul 24, 2009 12:18 pm
by davidwebb1969
Hi All,

My first post here and well it is all about an error, I am very new to PHP and I have no idea where my error is. It says line 273 (you cant see line number) This code is part of a registration page, can anyone please tell me where the error is in the code below the bold text is where it says the error is:

}
}
// If we had problems with the input, exit with error
if ($bInputFlag == false)
{
die("Problem with your <strong class="highlight">registration</strong> info."
."Please go back and try again.");
}
// Fields are clear, add user <strong class="highlight">to</strong> database
// Setup query

Now on my login page i get an error on line 133 (you cannot see) I have pasted the area in which the error is supposed to be but I am not sure once again what I am looking for. It is in bold:

<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/down ... player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->

I also get weird text in my login page any ideas why this would happen, please see the attached image
Image

Re: Errors in Code

Posted: Fri Jul 24, 2009 12:28 pm
by andyhoneycutt

Code: Select all

die("Problem with your <strong class="highlight">registration</strong> info."
   ."Please go back and try again.");
Should be written:

Code: Select all

die("Problem with your <strong class=\"highlight\">registration</strong> info."
   ."Please go back and try again.");
Your string-quoting is messed up o_0

Re: Errors in Code

Posted: Fri Jul 24, 2009 12:31 pm
by jackpf
You need to escape the quotes.