Jump to content

Php 5.1.4 question


nawhaley2265

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?
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.