Jump to content

e4games

Members
  • Content Count

    102
  • Joined

  • Last visited

Everything posted by e4games

  1. e4games

    User List Error

    Thanks, it works know
  2. e4games

    User List Error

    my revised code is on the first post...I editted it..like I said in my post.
  3. e4games

    User List Error

    I changed the code at the top...and it still gets the same error D: I also tried it with the semicolons only after the lines with the curly braces it them, but it still gets the same errorAnd it says no where that you need to put curly braces around PHP with HTML with it, especially not at the beginning of anything
  4. e4games

    User List Error

    I can't find a error with this code...can you guys help me? <?phpmysql_connect("Host Name", "username", "pass") or die(mysql_error()); mysql_select_db("DB name") or die(mysql_error()); $query=mysql_query ("SELECT * FROM users");echo "<tr><td colspan='2' bgcolor='darkyellow'>.::. Users .::.</td><tr/><tr><td colspan='2'>";while "($row = mysql_query ($query) ) ";{echo "<tr><td> {$row['ID']}";echo "</td></tr>";echo "<tr><td> {$row['username']}";echo "</td></tr>";}echo "</table>"";?> The code is suppos
  5. e4games

    Fan Site

    Don't bother even posting if your not going to say anything to make it better. EX- "The design was a bit ugly." then what would you recommend for colors.
  6. e4games

    Fan Site

    I made a fan site of pokemon, Its only about 5 days old and I was wondering if u guys think if its horrible or at least ok....My Pokemon Fansite
  7. e4games

    Error

    I tried changing it to what you said phpnoob, still doesn't work...I also added a error string, and there is still only a blank screen...
  8. e4games

    Error

    Oh o.O, well I fixed it and it still doesn't work...and its called Users..
  9. e4games

    Error

    I've looked threw the database and there was only 1 table called users, anyways I changed a few other things and it seems to work (didn't even touch the database)Anyways I still don't know what to do with the login issue, I'm gonna post it in the first post becuase I don't think its the way I'm coding the link to get to it, I think it might be the code for the login.... (cause I've have problems with this happening and it was the login code not the hyperlink code)
  10. e4games

    Error

    But I do have a table called "users"........I just checked the login and for some reason when you press the "login" button, the URL doesn't do anything, but I did it the same way that I did it with the register, and that works...
  11. e4games

    Error

    So...I tryed a different code for register and it still gets a error....help please! <?phpmysql_connect("MYSQL hostname", "username", "pass") or die(mysql_error()); mysql_select_db("database name") or die(mysql_error()); //Checks if there is a login cookieif(isset($_COOKIE['user']))//if there is, it logs you in and directes you to the members page{ $username = $_COOKIE['user']; $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 ($pass != $info['password']) {}else{header
  12. e4games

    Custom Things

    So I know if you set (when they register) is you do something like $username, it will display the viewing persons username. But how do I make it so that it only displays one username. Like when someone posts something for it to display that username to everyone. Or do it like a avatar when u pick a avatar to make sure that it only displays that users avatar not who ever is viewing it.
  13. e4games

    Login Error

    Ok, so know when you register it submits the information into the database, but instead of putting it in what you typed it puts in random characters. If you go to login using the random characters that it set as your password it still doesn't let you login. Here are my register and login codes. <?php require_once 'db.php'; $page_mode = $_POST['page_mode']; # empty variable defaults to '' (or null) if ($page_mode === 'register') { $username = mysql_real_escape_string(trim($_POST['username'])); $password = $_POST['password']; if ($password !== $_POST['conf_password']) $error_string .=
  14. e4games

    Db.php File

    <?phprequire_once 'db.php';$page_mode = isset($_POST['page_mode']) ? $_POST['page_mode'] : '';$error_string = '';if ($page_mode == 'register'){ $username = trim($_POST['username']); // trim to remove whitespace $password = $_POST['password']; $conf_password = $_POST['conf_password']; if ($error_string == '') { $result = db_query("SELECT id FROM users WHERE username='" . mysql_real_escape_string($username) . "'"); if (mysql_num_rows($result) > 0) $error_string .= 'That username is already registerd.<br>'; else { $username = mysql_real_escape_string($username); // protect ag
  15. e4games

    Db.php File

    <?php$con = mysql_connect('FTP_Hostname', 'username', 'password');mysql_select_db('Database_Name',);function db_query($sql){ return mysql_query($sql, $GLOBALS['con']);}?>
  16. e4games

    Db.php File

    I don't think so. All I have to do is this$error_string .= 'Error message here.';
  17. e4games

    Db.php File

    So I used the Database code that justsomeguy made and on my website, when you go to register it says that you did but then when I go to the database it says its empty. What's wrong and how should I fix it?
  18. e4games

    Cookies

    So I know how to add cookies to my site but how do I make it so if there is a cookie users see certain content
  19. e4games

    Layout

    I tryed doing the = sign for the alignments but I want it to be next to it..not above it
  20. e4games

    Layout

    This is my websiteand I can't get the navigation bar to be left of the content..it just goes above it..how do you get it to go on the same lines as your content but its easy to tell that there apartAnother question- how do you I get the tables to be a solid black line?
  21. e4games

    Login...username

    So for the code login.php I used the on "justsomeguy" did but I have some questions on how to make the login code so it says username other then email..Main Code <?phpsession_start();require_once 'db.php';$page_mode = isset($_POST['page_mode']) ? $_POST['page_mode'] : '';$error_string = '';if ($page_mode == 'login'){ $email = $_POST['email']; $password = $_POST['password']; if (trim($email) == '' || trim($password) == '') $error_string .= 'Please enter your email address and password.<br>'; else { $result = db_query("SELECT id, name, password FROM users WHERE email='" . mysql_re
  22. e4games

    Login

    I don't get it...I checked a bunch of places to see if I could figure it out and I can't...I don't get the code that makes it show certain pages...
  23. e4games

    Login

    ok, thanks...but my question is once they login in how do you make sure that the page is protected so only people who login can view the page??
  24. e4games

    Login

    So I got register done for my site (I think) and so I was wondering how to make a code that only shows up if your logged in
  25. e4games

    Working Register

    the link worked! thanks
×
×
  • Create New...