Jump to content

LiamProductions

Members
  • Posts

    496
  • Joined

  • Last visited

    Never

Posts posted by LiamProductions

  1. Well if i learn while a teenager... When im older like say 20 I won't have to spend the next 5 years learning PHP to get a job when im 20 I'll be able to get a Job because i'd have like 7 Years experience.

     

    And then when i earn money i can spend it going out places and drinking ect.

    And i do go out.

     

     

  2. jcombs, [...] your [sic] using age discrimination [...]. And don't you have better things to do aswell [sic]?

     

    Well, this is jcomb's web page (so his profile says at least). Web development is his WORK. I doubt web development is YOUR work. Besides, he is not discriminating.

     

    You can't stop me from Web Development and it will be my work one day. Why not learn early and have lots of experience in like 7 years?

  3. jcombs, You don't think i will create forums or games in PHP ever why is that?

     

    And your using age discrimination, I can learn PHP for a carrer in the future. And don't you have better things to do aswell?

  4. <?php
    
    $rand = rand(1,4);
    
    case $rand:
         case 1:
         echo "Imageurl.gif";
         break;
         case 2:
         echo "imageurl2.gif2;
         break;
        default:
        echo "No image was produced";
    

     

    not sure, if that case works but i'm sure the rand() function is giving you idea how you could do it

  5. Apparently not.  You are on a PHP forum, did you actually check out any tutorials?  you can't learn to program without programming, so think of something you want to develop and take the steps to learn how. I personally don't think I could have learned to program without going to college for it.  I also don't think at your age I would care to program, in fact I know I didn't care.  What exactly is your motivation at this point? Don't you have better things to do?

     

    Just reading what you said, I have programmed one thing a register and login script, I learned it off a tutorial on YouTube and i learn't a few things like this:

     

    if (!isset($_POST['username'])) {
               if(!isset($_POST['password'])) {
                  if(!isset($_POST['email'])) {
                  }
    else {
        echo "Please enter a email";
    }
    else {
         echo "Please enter a password";
    }
    else {
    echo "Please enter a username"
    }

     

    Thats something i didn't know how to do and i learnt how to get data from a database and how to un crack a md5...

     

    AND...

     

    What exactly is your motivation at this point? Don't you have better things to do?

     

    My motivation is to make great success with PHP in the future to work for clients and to make PHP games, Forums and more!

    Don't you have better things to do? Like what?

     

  6. Try this:

     

    $checkUser = mysql_query('SELECT * FROM user WHERE username ="'.$user.'" AND password ="'.md5($pass).'"')or die(mysql_error());

     

    Thank you very much, It would of been lots easier if i spotted it my self...

     

    The table was User not user lol but thanks i found the error thanks to that mysql_error

  7. Hey,

     

    I've got an error in my login script i don't quite understand it:

     

    <?php
    
    if(!isset($_POST['Login'])) {
    if(!isset($_POST['user'])) {
    	if(!isset($_POST['pass'])) {
    		$user = $_POST['user'];
    		$pass = $_POST['pass'];
    		$user = strip_tags($user);
    		$pass = strip_tags($pass);
    
    		mysql_connect('localhost', 'liam_liam', 'code090');
    		mysql_select_db('liam_database');
    
    		$checkUser = mysql_query('SELECT * FROM user WHERE username ="'.$user.'" AND password ="'.md5.$pass.'"');
    		$checkUserRows = mysql_num_rows($checkUser);
    
    		if($checkUserRows > 0) {
    			$_SESSION['user'] = $user;
    			echo 'Session is set';
    		}
    		else {
    			echo "Your cannot login because your data is not on my database";
    		}
    
    	}
    	else {
    		echo "Please enter a password to login";
    	}
    }
    else {
    	echo "Please enter a username to login";
    }
    }
    else {
    echo "You did not fill in all login form";
    }
    
    
    ?>

     

    Theres a error saying something about a error on mysql_num_rows and

    its saying You cannot login because your data is not in my database... but the data is...

     

    help please.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.