Jump to content
xisto Community

coder2000

Members
  • Content Count

    66
  • Joined

  • Last visited

About coder2000

  • Rank
    Member [Level 1]
  • Birthday 01/06/1983

Contact Methods

  • Website URL
    http://www.coder2000.ca
  1. The only real damage is from improperly permissioned or owned files. Register globals is only available from a server config so you can't turn it on from a script. Most databases cache the most used sql statements. Now I don't know how much that is done with MySQL but they aren't as taxing on a hdd as you might think.
  2. A good free graphics editor is GIMP. It is pretty much the linux equivilant of photoshop and is installed by default when select the graphics package.
  3. yeah if you don't intend to do anything against the policy you won't protest as much to being monitored.
  4. If I read the topic correctly you are using Demudi, which from my understanding is a media os similar to Windows XP media center edition. That project has become AGNULA as far as I can see. From that standpoint I would have to say that the capabilities of the os have been limited to its main focus. I would suggest using a different distrobution if you intend to use it as a desktop os. However if I am completely wrong in your intentions I am sorry.
  5. I think it depends on the usage policy the school has instituted and what warnings they give. If you say in the policy that computer usage may be monitored and give warnings in the lab to that effect I don't think there is an issue because they know that monitoring may occur and their actions are public. If the policy does not state anything about monitoring then it would be an issue because then the students think what they are doing is private and when they discover that they have been watched, feel that their privacy has been invaded. IMHO.
  6. how are you loading your images? relative or absolute paths? I don't reall think it matters that much. Hotlink works on my site so I have no idea what the problem would be but how you are accessing them.
  7. I don't think that gentoo is a distro I would recommend for new users. Something like Ubuntu, Mandrake or Fedora. Those are the easiest to setup and use. Knoppix is another good one for beginners.
  8. I downloaded the livecd. Sometimes people don't have the bandwidth or just like to have a real cd. I also ordered a bunch of cds which I haven't received yet.
  9. Ubuntu is a project of Canonical Ltd. which is located in the Isle Of Man, a part of the british commonwealth. It would be amazing if they didn't accept addresses from the uk. And yes they do ship internationally.
  10. coder2000

    Rip Microsoft?

    Linux has had 64bit support for a long while already. One reason linux doesn't have any viruses isn't because they are more difficult to write but because linux isn't as widely used. Yes there is added security with linux ins that permissions play a big role into who can run what. With SELinux things are going to be even more problematic for people who try and write viruses or worms for linux. It is superior to windows in every way but support for major games written in directx.
  11. Well its that time again. First thing we have to do is modify our login script. function loginUser() { session_start(); .... if (md5(password) == $row['fldPassword']) { $_SESSION['loggedin'] = true; .... }}Now we add the session_start at the beginning of our function so that it starts our session. Now we replace our setcookie with the $_SESSION variable. Now in any other php page you want to protect just add the following code: <?phpsession_start();if (!$_SESSION['loggedin']) { die("Not logged in");}?>Now there is a lot more that can be done with this but its a basic script that should get you started. Well that should be about it for this set of tutorials.
  12. Usually I would use a session why I didn't use it here I can't remember. I will show you in the next part how to convert it to a session so you can limit page access.
  13. something must be up with the servers. I can visit my site but can't login.
  14. Welcome back... Today we are going to log our users into our system. For those who haven't read the first tutorial it would be a good idea to do so as this will expand on that. Now we will start on our HTML for our login form. Create a new file and call it login.php with the following: <html> <head> <title>Login</title> </head> <body> <form action="<? $_SERVER['PHP_SELF']."?login=true" ?>" method="POST"> Username: <input type="text" name="username"><br> Password: <input type="password" name="password"><br> <input type="submit" value="Login"> </form> </body></html>Looks familiar? It should its basically the same html as we used for our register script. Now we will start on the PHP code. To the beginning of our file add the following: <?php if ($_GET['login'] = true) { loginUser(); }?><html>....Now we are going to arrange this file a bit differently. Instead of having our function at the top of the file we are going to have it at the bottom. So lets add another PHP code block there shall we: ....</html><?php function loginUser() { }?>One thing you should know is no matter how many times you open or close a PHP code block it is basically all apart of the same code. I will be demonstrating this more in a bit. For now lets just finish off our function: function loginUser() { $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT fldId, fldPassword FROM tblUsers WHERE fldUsername = '$username';"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); if (md5($password) = $row['fldPassword']) { setcookie('loggedin', $row['fldId']); echo "Logged In"; }}One thing I should point out is that I haven't done any error checking. If you were using this in a production environment you would want to do that. In PHP you can use variables inside a string as demonstrated by our SQL statement that gets the id and password of our user. Now lets only display our form if we haven't tried to login: if ... {} else {?><html>....</html>?>}function ...Here we have added an else statement to our if so that if we try and login we won't be displaying our form. Notice how the closing brace for the else is in our bottom section of PHP code. Well because all PHP code in a file is parsed at the same time we can do this. Well see you next time when I show you how to protect your pages.
  15. I vote for gentoo. It is more customizable than any other distro. I like Ubuntu and Fedora as well.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.