Results 1 to 7 of 7

Thread: new problem...

  1. #1
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default new problem...

    ok this is getting rediculous but im so dumb and all of you are smart...

    go to www.kalrith.com/add.php
    register
    go to www.kalrith.com/account.php

    now if you dont see the points then i did something wrong, because when i tested it on wamp, it worked perfectly, posted the points and everything, but NOOO it doesnt work on my actual website -.-

    here is the mysql table

    Code:
    CREATE TABLE users (ID MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
    username VARCHAR(60), password VARCHAR(60), points INT)
    here is the account code (in the mysql table it does say 20 so that is not a problem)

    PHP Code:
    <?php 
    // Connects to your Database 
    // Info deleted for mysql logon :)

    //checks for login
    if(isset($_COOKIE['ID_my_site'])) 

    // Collects data from users table  
    $username $_COOKIE['ID_my_site']; 
    $pass $_COOKIE['Key_my_site'];
    $check mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); 
    while(
    $info mysql_fetch_array$check )) 


    //if the cookie has the wrong password, they are taken to the login page 
    if ($pass != $info['password']) 
    header("Location: login.php"); 


    //member area is here 
    else 

    ?>
    <?php 
    include("head.php"); ?>
    <center>
    <table border = 1 bgcolor="black" width="70%">
    <tr>
    <th bgcolor="black">
    <font color="00ff00">
    <h2>Your Username: <?php echo $username?> </h2><p>
    <h2>Your Points: <?php echo $info['points']; ?></h2><br />
    Under Construction!
    </font>
    </th>
    </tr>
    </table>
    </center>
    <?php include("foot.php"); ?>
    <?php



    else 

    //if not a member is shown this

    ?>
    <?php 
    include("head.php"); ?>
    <h2><center><font color="white">
    You need to be signed in to have an account page!!
    </font></center></h2>
    <?php include("foot.php"); ?>
    <?php

    ?>
    dont get me wrong i could care less about my post count on here, i just keep running into problems and so far everyone here has been great about helping out
    Last edited by Demonicman; 03-03-2007 at 01:56 AM.

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I don't see anything about points in your mysql table (the code posted above). You may want to add that field in there or see if it is added to your mysql table and just didn't post it here. Either way, that would most likely be the problem.

    EDIT: Sorry, seen that you had posted it has the value of 20 in the db. Will look into the problem a little bit more.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    oh oops lol sorry it should say points INT

    but thats not the problem lol i just copied it from the wrong thing

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    The code looks fine to me (syntax wise as far as it should be working code I should say). You may want to check and see if it is getting an info from the sql query. Try making a seperate page with just the mysql_query and echo every possible column in the table. If one is blank, (or nothing shows up at all) then you know something is wrong with the query.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    nope 20 shows up... thats not the problem

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I don't know then, like I said before the code looks like it would work syntax wise. The only thing that would be causing it to do this would be if the mysql_query wasn't returning any results. Perhaps someone else can spot the problem.

    Sorry I can help much more.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    FIXED! i figured it out (dont know how)
    Last edited by Demonicman; 03-03-2007 at 03:14 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •