Jump to content

Elivmar

Members
  • Posts

    106
  • Joined

  • Last visited

Posts posted by Elivmar

  1. That's strange. If I take out the Mysql connections it works fine. When I put the connections back in it goes slow again, yet it's only with this page.

     

     

    EDIT: For some reason it's going normal speed now ^_^

  2. So what does everyone like to do?

     

    I recently got into fishing. Something I never thought I would like. I moved to a house on the water and since i'm able to do it often it's more fun.

     

    I also like swimming, camping, Warhammer 40K, playing Wii, Computer, and Watching movies. That about sums up what I like to do xD.

  3. I never saw the point of it. It seems a lot like club penguin to me. I'd much rather reactivate my WoW account, which I deactivated because it was boring, than spend money on virtual clothes and furniture.

  4. I get this problem too. It used to be more frequent when I first joined and I wouldn't be able to get on for a whole day sometimes. Now it doesn't happen as much or last as long. I use Firefox and have a cable connection.

     

    Also I referred my friend here and he wasn't able to get to the forums at all and still can't.

  5. For some reason my site has been going incredibly slow. Although it's only one page on the site. This Page

    Every other page goes fine except for that one. Not sure what's wrong with it except I only have about 15 lines of code on that page so I don't think it's from my end.

     

    Thanks,

    -Elivmar

  6. It looks amazing and is probably worth the $600 that it costs. I have a friend who has it and loves it. However there is one MAJOR reason I wont get it. $60 a month to use! My friend parents pay the phone part of $40 a month and he has to pay the $20 of internet. Not worth $60 when I can just come home for the internet.

     

    My Razr has free music, camera, video camera, and a phone. Maybe when the Iphone price goes down I'll consider it.

  7. I just finished coding my registration script which I am hoping to use on my website. I was hoping someone could answer one question and also just take a look over the script.

    My first question is my use of Regex. I tried to make it so that they can only use letters, numbers, and underscores in their name. So far the most I was able to do is make it so they can't have names like $%^&$^, but the problem i'm having is if they use a combination like Hello!@# it doesn't give the error. How can I fix this?

     

    Also if someone can look over my script and tell me if it's secure enough to use on my website that would be appreciated too. Thanks :).

    NOTE: The script has a lot of notes all over so it's easy to read.

    <html>
    <?php
    //CONNECT TO DB
    mysql_connect("****","***","***") or die(mysql_error());
    mysql_select_db("***") or die(mysql_error());
    //CHECK IF USER HAS SUBMITTED THEIR INFO
    if(isset($_POST['submit'])) {
    //IF INFO IS SUBMITTED SETS INFO TO VARIABLES
    $username = strtolower($_POST['username']);
    $displayname = $_POST['displayname'];
    $password = $_POST['password'];
    $password2 = $_POST['password2'];
    $email = strtolower($_POST['email']);
    $month = $_POST['month'];
    $day = $_POST['day'];
    $year = $_POST['year'];
    $birthdate = $month."-".$day."-".$year;
    if (preg_match('/[0-9a-zA-z_]+/', $username)){
    if (preg_match('/[0-9a-zA-z_]+/', $displayname)){
    //SET QUERIES FOR USE OF CHECKS LATER
    $checkusername = mysql_query("SELECT username FROM users WHERE username = '$username'") or die(mysql_error());
    $checkdisplayname = mysql_query("SELECT displayname FROM users WHERE displayname = '$displayname'") or die(mysql_error());
    $checkemail = mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error());
    //CHECK IF ANY FIELDS ARE NULL
    if($username == '' || $displayname == ''|| $password == ''|| $password2 == ''|| $email == '') {
    die("One of your fields were not filled out!");
    }
    //PASSWORDS MATCH
    elseif($password != $password2) {
    die("Your passwords did not match!");
    }
    //MAKE SURE FIELDS ARE LONG ENOUGH
    elseif($username != strtolower($displayname)) {
    die("Your username and display name should be the same! However your display name will be how your name is displayed, like showing capitals.");
    }
    elseif(strlen($username) < 3 || strlen($displayname) < 3 || strlen($email) < 5 || strlen($password) < 3) {
    die("Either your username, displayname, email, or password were to short!");
    }
    //MAKE SURE USERNAME ISNT TAKEN
    elseif(mysql_num_rows($checkusername) !== 0) {
    die("That username is already in use!");
    }
    //MAKE SURE DN ISNT TAKEN
    elseif(mysql_num_rows($checkdisplayname) !== 0) {
    die("That Display name is already in use!");
    }
    //MAKE SURE EMAIL ISNT TAKEN
    elseif(mysql_num_rows($checkemail) !== 0) {
    die("That Email is already in use!");
    }
    //MAKES SURE INFO IS SECURE. CHECK SECURITY
    elseif(htmlentities($email) != $email || mysql_real_escape_string($email) != $email || strip_tags($email) != $email || stripslashes($email) != $email) {
    die("Please use proper characters! No HTML, PHP, etc...!");
    }
    //MAKES SURE THERE IS NO WHITE SPACE
    elseif(trim($username) != $username || trim($displayname) != $displayname || trim($email) != $email) {
    die("Please do not put any white space in your fields!");
    }
    else {
    //GETS DATE AND ENCRYPTS PASSWORD
    $currentdate = date("m/d/y"); 
    $password3 = md5($password2);
    //INSERTS INTO DB
    mysql_query("INSERT INTO users (username, displayname, password, email, birthday, signedup, money, staff) VALUES('$username','$displayname','$password3','$email','$birthdate','$currentdate','100','no')") or die(mysql_error());
    echo "Registered!<br><a href = 'index.php'>Home</a>";
    }
    }
    //ERRORS FOR REGEX ABOVE
    else {
    die("Your display name can only contain Letters, Numbers, and Underscores");
    }
    }
    else {
    die("Your username can only contain Letters, Numbers, and Underscores");
    }
    }
    //IF THEY HAVE NOT SUBMITTED THEIR DATA THIS ALLOWS THEM TO ENTER IT
    else {
    echo "<form action = 'register.php' method = 'post'>
    Username:<input type = 'text' name = 'username'><br>
    Display Name:<input type = 'text' name = 'displayname'><br>
    Password:<input type = 'password' name = 'password'><br>
    Re-Enter Password: <input type = 'password' name = 'password2'><br>
    Email:<input type = 'text' name = 'email'><br>
    Birthday:<select name = 'month'>
    <option>January</option>
    <option>February</option>
    <option>March</option>
    <option>April</option>
    <option>May</option>
    <option>June</option>
    <option>July</option>
    <option>August</option>
    <option>September</option>
    <option>October</option>
    <option>November</option>
    <option>December</option>
    </select><select name = 'day'>";
    $startday = '1';
    while($startday < 32) {
    echo "<option>".$startday."</option>";
    $startday = $startday + 1;
    }
    echo "</select><select name = 'year'>";
    $startyear = '1920';
    while($startyear < 2004) { 
    echo "<option>".$startyear."</option>";
    $startyear = $startyear + 1;
    }
    echo "</select><br>
    <input type = 'submit' name = 'submit' value = 'register'>
    </form>";
    }
    ?>
    </html>

    And you can test the script at http://mattgib.heliohost.org/register.php.

    Also not sure if it will still be there when you look at it but theres some PHP errors at the top but they appear to be part of the ads on top and not my script.

  8. I've had a Wii since it came out and love it. The xbox 360 is like a hyped-up xbox. Nothing different or special about it. Although, because the 360 has GOW and Halo 3 I would choose it over a PS3.

     

    Wii has SSBB and Zelda, motion sensors, and unique features. The 360 has...really good graphics. Don't get me wrong, graphics are important, but gameplay is MUCH more important.

  9. Yea, the 3D engine is cool, however there wont be anymore stacking xD. I like the Physics engine, thats pretty cool. Especially how it leaves imprints from nukes and when ships crash the parts roll down hills.

     

    My s/n on SC:BW is link1231 . I haven't been on lately though, been busy. Whats yours? O, and do you play on US East?

  10. The movie I can watch over and over is the movie which I have made (haha.... :lol: ) as I am a budding movie and video editor. :) Every time I watch my movies, I saw a fault and I tried to correct it. Now, if you ask for any other director's film then there is only one movie in my list - 'The Matrix' Part 1. It has many things to learn. Every time I see this movie, I learn something. And the concept? Man, it is awesome. If you think in-depth about the concept of this movie, you will be surprised to see the depth it has touched. The movie is all about the awakening of the 'Gray Matter' in our brain and according to the scientists, if the 'Gray Matter' becomes active 100%, the person would become GOD. Einstein was 'Einstein' because only 10% of his 'Gray Matter' became active - scientists say. The movie 'The Matrix' is totally based on this 'awakening'. What would you say?:D

     

    Wow thats pretty interesting. My science teacher told me Einstein was able to think with two brain cells at a time unlike other people which made him smart. Maybe this has something to do with Gray Matter? We should open a topic on this in the other section xD.

×
×
  • Create New...