Page 1 of 1

Problems....

Posted: Fri Feb 05, 2010 12:28 pm
by Worqy
I downloaded the Login script from this site:
http://evolt.org/PHP-Login-System-with- ... er_page=50
Now when I try to runt it, using XAMPP, the problem comes.
For example:
On the register.php I see this on my web browser:

Code: Select all

logged_in){ echo "
Registered
"; echo "
 
We're sorry $session->username, but you've already registered. " ."Main.
"; } /** * The user has submitted the registration form and the * results have been processed. */ else if(isset($_SESSION['regsuccess'])){ /* Registration was successful */ if($_SESSION['regsuccess']){ echo "
Registered!
"; echo "
 
Thank you ".$_SESSION['reguname'].", your information has been added to the database, " ."you may now log in.
"; } /* Registration failed */ else{ echo "
Registration Failed
"; echo "
 
We're sorry, but an error has occurred and your registration for the username ".$_SESSION['reguname'].", " ."could not be completed.
Please try again at a later time.
"; } unset($_SESSION['regsuccess']); unset($_SESSION['reguname']); } /** * The user has not filled out the registration form yet. * Below is the page with the sign-up form, the names * of the input fields are important and should not * be changed. */ else{ ?>
Register
num_errors > 0){ echo "".$form->num_errors." error(s) found"; } ?>
Username:   ">  error("user"); ?>
Password:   ">  error("pass"); ?>
Email:  ">  error("email"); ?>
Back to Main
Insted of seeing the 'resultate' of the script, I see parts of the code.
Anyone who can help me?
//Kevin

Re: Problems....

Posted: Fri Feb 05, 2010 12:46 pm
by JNettles
I see two possibilities. Either you didn't name your file properly with a .php extension or PHP short tags is disabled in PHP config.

At the top of your script change...

<?

to

<?php

Should work.

Re: Problems....

Posted: Fri Feb 05, 2010 1:40 pm
by klevis miho
Because this is treated like a string i guess.
Paste the code into a software which highlights the code(for example notepad++)