Jump to content

Archived

This topic is now archived and is closed to further replies.

nawhaley2265

Php 5.1.4 question

Recommended Posts

I have a question for those of you who have moved up a few versions of php. Last version I was working with before we updated was 5.0.2 where the following code worked fine.

[code]
function UserLogin()
{

/* displays the user login screen. Hidden fields used for the CHAP protocol to try to make the login more secure do not alter please*/
$challange = md5(mt_rand(1,10000));

print('<P ALIGN ="center"><IMG SRC ="ITIlogo1.jpg"></P>');
print('<FORM METHOD ="POST" ACTION ="appluserlogin.php" NAME ="loginform" id ="loginform" onSubmit ="userpassword()">');
print('<P ALIGN ="CENTER">');
print('<B><U>User Login</U><BR><BR>');
print('UserName:');
print('<INPUT TYPE ="text" NAME = "username" id="username" SIZE = 15>'.'<BR>');
print('Password:  ');
print('<INPUT TYPE ="password" NAME = "password" id="password" SIZE =15>');
print('<INPUT TYPE ="hidden" NAME ="challange" id ="challange" VALUE ="'.$challange .'">');
print('<INPUT TYPE ="hidden" NAME ="response" id ="response" VALUE ="">'.'<BR>');
print('<INPUT TYPE ="submit" NAME = "submit" VALUE ="Login">');
print('</B></P></FORM>');

}
[/code]

now however all I get is a blank screen no error messages in my log no nothing just a blank screen has php changed the way it will allow you to print html to the browser or so I have some really obscure syntax error that the compiler isnt catching?

Share this post


Link to post
Share on other sites
I can't see anything obvious jumping out at me, have you made sure error reporting / logging has been switched on within your php.ini file?

Share this post


Link to post
Share on other sites
[!--quoteo(post=386557:date=Jun 21 2006, 02:43 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Jun 21 2006, 02:43 PM) [snapback]386557[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I can't see anything obvious jumping out at me, have you made sure error reporting / logging has been switched on within your php.ini file?
[/quote]

ok glad I wasn't going crazy, no its logging correctly though the php markers are strange in this new version apparently at the start of the file you have to use <?php but if you close out of the php at any point with a ?> you have to use just <? to start php up again otherwise you get a syntax error, its very bizzarre I'm still getting use to it. Use to you did it one way or the other not both ways it made it more consistant and readable that way I thought but apparently I was in the minority. At any rate I made a change and got a slew of errors cropping up now to fix *sigh* I hate new compilers.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.