PHP Login System with Admin Features

This forum was created to talk about the PHP Login System with admin features created by jpmaster77 on evolt's website


    Problem with the main/register pages

    Share

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Problem with the main/register pages

    Post  L on Mon Jun 04, 2007 12:06 am

    When I try using this login, it doesn't work for me...All i did was change the host name, pass, and user in constants and database. When I load the main page, with all the other files that cam with the zip, all I get is a Username : (BOX). Then when I go to the registration page the same thing happens...here is a visual, https://2img.net/h/i169.photobucket.com/albums/u229/Taizku/dontlike.jpg
    -Please help as soon as possible...
    I'm not too sure what I did wrong at all
    -Thank you for your time, and making the forum(maybe someone can actually help me now, Very Happy )
    ~L
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Mon Jun 04, 2007 9:57 pm

    L wrote:When I try using this login, it doesn't work for me...All i did was change the host name, pass, and user in constants and database. When I load the main page, with all the other files that cam with the zip, all I get is a Username : (BOX). Then when I go to the registration page the same thing happens...here is a visual, https://2img.net/h/i169.photobucket.com/albums/u229/Taizku/dontlike.jpg
    -Please help as soon as possible...
    I'm not too sure what I did wrong at all
    -Thank you for your time, and making the forum(maybe someone can actually help me now, Very Happy )
    ~L
    This is a very strange probleme, I suggest you to re-download the files and try to upload it again without making any changes to the script. Because I can see in your script that you have a categorie java script try to run, maybe there is something wrong whit this java script.

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Mon Jun 04, 2007 10:53 pm

    yah, I re-downloaded it, and re-uploaded it and it is the same result...also i didn't make any changes to the script this time so I don't know whats wrong....AH!!!

    -Also the javascript is apart of the ad in the site...i can't find a free php hst without ads...i added nothing to anything in what i uploaded this time and it's still messed up.... Sad Sad Sad
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Wed Jun 06, 2007 7:54 am

    L wrote:yah, I re-downloaded it, and re-uploaded it and it is the same result...also i didn't make any changes to the script this time so I don't know whats wrong....AH!!!

    -Also the javascript is apart of the ad in the site...i can't find a free php hst without ads...i added nothing to anything in what i uploaded this time and it's still messed up.... Sad Sad Sad

    This is weird seem like the hst where you host your page trying to put some stuff into your code:

    Code:

    <html>
    <title>Jpmaster77s Login Script</title>
    <body>

    <table>
    <tr><td>



    <h1>Login</h1>
    <form action="process.php" method="POST">
    <table align="left" border="0" cellspacing="0" cellpadding="3">
    <tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="
    <br><font face='Verdana' style='font-size: 11px; background-color:#FFFFFF'><a target='_blank' href='http://www.freewebhostingarea.com'><font color='#000000'>Free Web Hosting</font></a></font>
    <script type='text/javascript'
    src='http://www.6te.net/category3/p.js'>
    </script>

    p.js from freewebhostingaera give you trouble... SO this issu is something with the web hosting.

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Wed Jun 06, 2007 3:42 pm

    I got a new host with no ads and the same thing is happening...plez help...
    When I cick view souce it stops after the first input value, for hte username....Are you not allowed to have php in the username input value slot? cause that's how it was when i downloaded it.
    HERE IS MY MAIN.php code

    <?
    /**
    * Main.php
    *
    * This is an example of the main page of a website. Here
    * users will be able to login. However, like on most sites
    * the login form doesn't just have to be on the main page,
    * but re-appear on subsequent pages, depending on whether
    * the user has logged in or not.
    *
    * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
    * Last Updated: August 26, 2004
    */
    include("include/session.php");
    ?>

    <html>
    <title>Jpmaster77's Login Script</title>
    <body>

    <table>
    <tr><td>


    <?
    /**
    * User has already logged in, so display relavent links, including
    * a link to the admin center if the user is an administrator.
    */
    if($session->logged_in){
    echo "<h1>Logged In</h1>";
    echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
    ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] &nbsp;&nbsp;"
    ."[<a href=\"useredit.php\">Edit Account</a>] &nbsp;&nbsp;";
    if($session->isAdmin()){
    echo "[<a href=\"admin/admin.php\">Admin Center</a>] &nbsp;&nbsp;";
    }
    echo "[<a href=\"process.php\">Logout</a>]";
    }
    else{
    ?>

    <h1>Login</h1>
    <?
    /**
    * User not logged in, display the login form.
    * If user has already tried to login, but errors were
    * found, display the total number of errors.
    * If errors occurred, they will be displayed.
    */
    if($form->num_errors > 0){
    echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
    }
    ?>
    <form action="process.php" method="POST">
    <table align="left" border="0" cellspacing="0" cellpadding="3">
    <tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
    <tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
    <tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
    <font size="2">Remember me next time &nbsp;&nbsp;&nbsp;&nbsp;
    <input type="hidden" name="sublogin" value="1">
    <input type="submit" value="Login"></td></tr>
    <tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>
    <tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>
    </table>
    </form>

    <?
    }

    /**
    * Just a little page footer, tells how many registered members
    * there are, how many users currently logged in and viewing site,
    * and how many guests viewing site. Active users are displayed,
    * with link to their user information.
    */
    echo "</td></tr><tr><td align=\"center\"><br><br>";
    echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>";
    echo "There are $database->num_active_users registered members and ";
    echo "$database->num_active_guests guests viewing the site.<br><br>";

    include("include/view_active.php");

    ?>


    </td></tr>
    </table>


    </body>
    </html>
    Here is my new site with the same problem....please help me out!
    http://taizku.phpnet.us/main.php
    avatar
    Linchpin311

    Number of posts : 220
    Age : 33
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Problem with the main/register pages

    Post  Linchpin311 on Fri Jun 08, 2007 12:36 am

    just from looking at the link you provided (http://taizku.phpnet.us/main.php) it looks like another hosting problem. are you sure your host has php on their servers, and are you sure you have access to it?

    is it possible for you to download, say, apache and php and test the script from your pc? maybe this will let us know exactly where the problem lies.


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Fri Jun 08, 2007 1:40 am

    yah, my host has php, and mysql, and how would i download php and test it?...Also if it is my host can you give me a free host that would actually allow this to work?

    EDIT: Nm, I downloaded it...but how would i use PHP to test if the code works or not...when i click the program i just get a black box into which i can type...and when i press enters it doesn;t submit or anythin....also try the link again, i was experimenting if i could find the prolme or not that's why it was all messed up....it should be back to the original problem i had
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Fri Jun 08, 2007 8:41 am

    L wrote:yah, my host has php, and mysql, and how would i download php and test it?...Also if it is my host can you give me a free host that would actually allow this to work?

    EDIT: Nm, I downloaded it...but how would i use PHP to test if the code works or not...when i click the program i just get a black box into which i can type...and when i press enters it doesn;t submit or anythin....also try the link again, i was experimenting if i could find the prolme or not that's why it was all messed up....it should be back to the original problem i had

    Try to test locally with localhost by downloadinf xampp apps..

    It's a free mysql/php apache host for develloper.

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Fri Jun 08, 2007 10:10 am

    how would i use it through....i downloaded it and i have no idea how to use it
    avatar
    Linchpin311

    Number of posts : 220
    Age : 33
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Problem with the main/register pages

    Post  Linchpin311 on Fri Jun 08, 2007 10:12 am

    xampp is a great idea because it comes with so many great programs/servers/features, but i have never downloaded it so im not sure how to set it up. i just downloaded apache and php from their respective websites and configured them manually...maybe fred-eric can help you with all the configuration issues.

    im assuming that black box you see is php's command prompt. thats a great tool to test scripts to see their results before you go live with them on the web.

    i would suggest making sure apache and php are configured correctly. first, make sure apache is working by opening up your browser and typing "http://localhost" (without the quotes of course) into the address bar. if apaches welcome page comes up, apache is good to go. if it doesnt come up, something is wrong with your configuration that you need to fix before you can move on to the next step.

    next make sure php is working properly. you can confirm this by creating a simply script. open your text editor and type:
    Code:
    <?php
    echo "Hello World!";
    ?>
    save that as somefile.php file in apache's htdocs folder and open up your browser again. type "http://localhost/somefile.php" (again without the quotes) in the address bar and cross your fingers. if you see "Hello World!" in your browser then you are golden. everything is working and i think you should move all of the login system files into apaches htdocs folder and start testing the script from your local machine.

    let me know how this works out for you!

    i think tomorrow when i get some free time im going to download xampp so i can help people configure it onto their pc's.


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Fri Jun 08, 2007 10:19 am

    yah, when i put the url in the address bar it just goes blank.....so this means it isn't configured yet? How would i configure this to work properly? Oh, i didn't see that you're gona help tommorow...well thnx for replying and trying to help me out. Much appreciated Very Happy
    avatar
    Linchpin311

    Number of posts : 220
    Age : 33
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Problem with the main/register pages

    Post  Linchpin311 on Fri Jun 08, 2007 10:25 am

    are you testing apache or are you trying the php script?

    if you get a white screen when testing apache, well then thats just weird. it usually says something like server not found or unable to connect or something to that effect.

    if youre testing php and you get a white screen. make sure you are calling the page from apache (ie. the address bar MUST say http://localhost or you can put your local machines ip address in place of localhost). if you are calling the page correctly and you still get a white screen then php isnt configured correctly.


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Fri Jun 08, 2007 11:19 am

    Well, i've been sitting here waiting for the pages, but they just say, "Loading"
    Is a blank page and loading a difference....Also I'm assuming that it's not configged just because it's taking around 30 minutes to load.
    avatar
    Linchpin311

    Number of posts : 220
    Age : 33
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Problem with the main/register pages

    Post  Linchpin311 on Fri Jun 08, 2007 11:57 am

    yea, it sounds like apache isnt configured properly yet...

    im sorry that i cant help you configure it out of the xampp installation. i plan on downloading and getting familiar with xampp saturday maybe, but you can try doing a little research on google for some answers.

    just judging from his posts, fred-eric might know more about xampp, you can try sending him a pm or something.


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Fri Jun 08, 2007 7:32 pm

    xampp is very easy to install.

    The xampp apps can run from a usb key so there is no installation needed

    1- download xampp and extract the files from the zipped sources into a directory. ex: d:\web\xampp
    2- run the batch files call: D:\WEB\xampp\setup_xampp.bat in the main directory
    3- open your browser and type into the address bar : http://localhost/
    4- fallow the instruction to complete the configuration.

    that's it, you have a fully web server installed
    also what isw fun with this is that you can test e-mail sending form locally with MercuryMail.

    Anyway, try it you'll see

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Fri Jun 08, 2007 11:41 pm

    alright....hmm......when I run "setup_xampp.bat" a cmd pops up and says "there is nothing to do. Press anything to continue"

    Then when I go to localhost in the browser the same thing happens....it is still loading
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Sat Jun 09, 2007 9:04 am

    L wrote:alright....hmm......when I run "setup_xampp.bat" a cmd pops up and says "there is nothing to do. Press anything to continue"

    Then when I go to localhost in the browser the same thing happens....it is still loading

    This is mean that you already run the cmd files and all configuration as been done successfully, the server is now ready to run normally.

    Your on the way to go....... continue

    Now open your web browser and type http://localhost/php_login_system_2.0/
    .
    But first copy the login script into the htdocs folder inside the main folder of xampp, for exemple

    D:\WEB\xampp\htdocs\php_login_system_2.0

    cool

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Sat Jun 09, 2007 1:02 pm

    alright,
    first I copied the folder, Login System v.2.0, to C:\xampp\htdocs
    then I typed into my browser, http://localhost/Login System v.2.0/

    Then same problem is occurring...it still says it's loading
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Tue Jun 12, 2007 5:30 pm

    L wrote:alright,
    first I copied the folder, Login System v.2.0, to C:\xampp\htdocs
    then I typed into my browser, http://localhost/Login System v.2.0/

    Then same problem is occurring...it still says it's loading

    post a screen capture of what you get.

    this is weird because it's working

    wait did you set the database and the constant.pfp files?

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Tue Jun 12, 2007 6:22 pm


    post a screen capture of what you get.

    this is weird because it's working

    wait did you set the database and the constant.pfp files?
    Here is a screen shot....
    https://2img.net/h/i169.photobucket.com/albums/u229/Taizku/ah.gif
    and I didn't set the database or the constant.pfp files....all i did was run the .bat like you told me to

    Also if it the host that's causing me problems...can you recommend me one that you know works with this?
    -thank you for your time and helping me thus far
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Tue Jun 12, 2007 10:03 pm

    L wrote:

    post a screen capture of what you get.

    this is weird because it's working

    wait did you set the database and the constant.pfp files?
    Here is a screen shot....
    https://2img.net/h/i169.photobucket.com/albums/u229/Taizku/ah.gif
    and I didn't set the database or the constant.pfp files....all i did was run the .bat like you told me to

    Also if it the host that's causing me problems...can you recommend me one that you know works with this?
    -thank you for your time and helping me thus far

    %20 for space in the url
    http://localhost/php%20login%20system%202.0/main.php


    you will see:




    IMPORTANT THE INDEX FILES DOES NOT EXIST SO BE SURE TO TYPE THE MAIN.PHP FILES INSTEAD

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Tue Jun 12, 2007 10:53 pm

    this is getting on my nerves...i don't get why this isn't working...i renamed the folder for simplistic reasons to login instead of Login v.2.0. So now the url I type in is
    http://localhost/login/main.php
    the url of the folder on my cpu is
    C:\xampp\htdocs\login\main.php
    I'm still getting the loading sign and I'm really confused... Question

    Well when i tr in Internet explorer i get a page can't be displayed, while in firefox i get a forever loading

    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Wed Jun 13, 2007 5:38 pm


    L

    Number of posts : 14
    Registration date : 2007-06-04

    Re: Problem with the main/register pages

    Post  L on Sat Jun 23, 2007 3:42 am

    I THINK I KNOW THE PROBLEM!!!!|
    I think the download is corrupt, so i was wondering if someone could give me the rar that works for them so i can use it
    -Please help
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problem with the main/register pages

    Post  Fred-Eric on Sat Jun 23, 2007 12:53 pm



    check this


    Sponsored content

    Re: Problem with the main/register pages

    Post  Sponsored content


      Current date/time is Wed Nov 14, 2018 1:42 am