Jump to content

unenergizer

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

About unenergizer

  • Birthday 03/12/1987

Contact Methods

  • AIM
    unenergizer
  • MSN
    unenergizer@hotmail.com
  • Website URL
    http://www.gamehaxs.com/
  • Yahoo
    unenergizer

Profile Information

  • Gender
    Not Telling
  • Location
    USA

unenergizer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=361668:date=Apr 4 2006, 02:12 PM:name=jvrothjr)--][div class=\'quotetop\']QUOTE(jvrothjr @ Apr 4 2006, 02:12 PM) [snapback]361668[/snapback][/div][div class=\'quotemain\'][!--quotec--] Session Start needs to be the first thing. [code] <? //login.php session_start(); include 'config.php'; [/code] Start with that [/quote] I know that... But everytime i try and log in, im getting my error message saying that the username and password is wrong. Did i write this incorrectly or something? Because im stupmted... There are not any syntax errors, I just cant log in. And all my myql tables names and everything else are 100% correct as i've looked those over time and time agin..... Can anyone suggest or does anyone know what is wrong with my code??? thank you... unenergizer
  2. Ok.. Im teaching my self on how to make different things in php. Well, I am having trouble with my script and I have no clue where to start looking for errors... [code]<? //login.php session_start();  // Start Session include 'config.php'; include 'header.php'; $username = $_POST['username']; $password = $_POST['password']; mysql_query("SELECT * FROM user WHERE userid='$userid'"); $_SESSION['userid'] = $userid; if((!$username) || (!$password)){     echo "Please enter ALL of the information!<br />";     include 'login_form.html';     exit(); } // Convert password to md5 hash $password = md5($password); $sql = mysql_query("SELECT * FROM user WHERE username='$username' AND password='$password' AND userlevel='$userlevel'"); $login_check = mysql_num_rows($sql); if($login_check > 0){     while($row = mysql_fetch_array($sql)){     foreach( $row AS $key => $val ){         $key = stripslashes( $val );     }         // Register some session variables!         session_register('username');         $_SESSION['username'] = $username;         session_register('password');         $_SESSION['password'] = $password;         session_register('userlevel');         $_SESSION['userlevel'] = $userlevel;         mysql_query("UPDATE user SET last_login=now() WHERE userid='$userid'");         header("Location: members.php");     } } else {     echo "You could not be logged in! The username and password do not match! Please try again!<br />";     include 'login_form.html'; } ?>[/code] I know that I am asking help with something very simple, but I am learning. And any help as to why my script doesn't work would greatly help me understand what is going on. Thanks! unenergizer
  3. This seems to be beyond the scope of my programming knowledge. I really want to get started in programing php, but as of now all I have are online tutorials to read. Though I do have some experience, I just dont have enough for this. Though, can anyone reccommend a great resource that explains GD, that maybe even will provide tutorials, etc. Thanks unenergizer
  4. This process for me would have to be automated. Taking manual screenshots is not an option. I have come to realize that this may be an asp application, or could even be a cgi application aswell. However, php is not a requirement for me with my project in plan, so if anyone knows about being able to do this with any server side scripting languages, then please share. :) Thanks unenergizer
  5. redbullmarky, if I was you, suggestion 1 would be my choice. You say that the ftp login information is going to be changed correct? Well, if they chage it, then it should be hard to remember when the first initial install is being made. So, when they are installing the scrypts, have there ftp info a requirement. This would make it easy on you and your clients, and would prevent confusion with later updates. But you should do what you feel is best. Enjoy, and let us know how everything turns out! :) -unenergizer
  6. There is really no way for them to update with out them entering there ftp details. If you, as an individual were to create a script that could overwrite peoples php files on different servers, while not knowing there ftp infromation, then you would have just started a hacking revolution. Think about it. If anyone could just creat a script that could overwrite files, then you would see websites being constantly destroyed or worse. So with alittle bit of new found logic under our belt, we know its not going to be as simple as Microsofts GUI's. Though think about this. The way I suggested, you would only have to remember 3 thinks. [ol type=\'1\'][*]Domain[*]FTP Username[*]FTP Password[/ol] And you could load the clients url into the login scrypt. So what now? Just an FTP username and password? Think about this. What all do you know that would require a username and/or password? Your Bank Account, Debit Card, ATM Cards, maybe your cell phone, etc. So basicly what I am getting at, is most people wont have trouble remembering a simle ftp username and password. That my friend, is the simplest way. ********Wow. Something just came to mind. Also, you could make your script so that, when the user/client first runs it, it will ask them for there ftp username and password. When they have this enterend, it will save in there (your clients) database. And when they click update, the ftp login information could be sent from there database to your update/installation script allowing your installation to have an easy "one click install." But you may think that, what if the ftp username and password change. Well, yes if a change was made, it wouldnt show up in there mysql databse. However you should make it so that, when a user updates this information (such as there ftp info in there cpanel), and they dont reconfigure there ftp info on your script, have your script check to see if it can open up the ftp. And if the ftp doesnt open, then the script should display a msg saying that there ftp details are incorrect. Sorry, I am not the best at explaining my logic when it comes to programming. I kind of just know, and then write it. But explaining it in words is difficult for me. So if you do not understand what im getting at, then I will rephrase my wording. Anyhow, hopes this helps you. -unenergizer
  7. There are a few options that you may use. First, your clients are going to have some kind of administration panel correct? Well, set up a seperate mysql database at your site. When the user logs in to the administration panel, make a script to read the mysql database (on your site) to see if there was an update. If you have recoreded in your database that there is an update to the software, then it should show a link in your clients admin panel. When the link is present, I would have the user click the link, wich would in return to to your site where your installation scrypt is located. Make your installation scrypt. In the first part of your installation script, make your clients enter there own ftp details in the installation script. When there ftp details are entered, you can use php to over write there old files, and if needed update mysql tables etc. I hope this has given you some helpfull information. And YES this has been done. unenergizer
  8. Are there any know tutorials about how to take snap shots of websites with php? Im not excatly sure how to describe this, but I found a perfect example. At www.whois.sc, when I searched for my domain, just out of bordom, I saw that it showed the homepage of my site (http://www.whois.sc/gamehaxs.com). I was just wondering how to do this. If you can help me find a tutorial or more reading on this, then I would GREATLY apperciate it!
  9. hey, thanks alot man, you helped fix my problems.. everything is working like a charm now!!! I have one more simple question for you. Would you use Sessions for user level access (like Admin, Mod, User), or would this be a bad idea? thanks agin!! -unenergizer
  10. Well, i tested it out and when both my passwords are the same, it shows the error pw dont match notice.. also, i have a question about sessions... yes i read the sticky in this forum.. but if i log a userin with my login.php file, how do i get there userid to be a session so i can use it as a varable on other pages? unenergizer
  11. well, im not getting any errors... but its not updating the password... thats what im having a problem with... i might also be having a sessions problem... do any of you know good tutorials for sessions for use with multiple pages? -unenergizer
  12. [code] <form method="post" action="changepass2.php"> <input type="hidden" name="id" value="<?=$id;?>">   <table width="700" border="0" cellpadding="2" cellspacing="1" class="box" align="center">     <tr>       <td width="100">New Password</td>       <td><input name="newpw" type="text" class="box" id="newpw"></td>     </tr>     <tr>       <td width="100"> </td>       <td> </td>     </tr>     <tr>       <td colspan="2" align="center"><input name="update" type="submit" class="box" id="update" value="Update Password"></td>     </tr>   </table>   <p align="center"><a href="memberarea.php">Back to Member Area</a></p> </form> <? // Includes include 'config.php'; include 'lang_eng.php'; $_SESSION['username'] = $username; $newpw = $_POST[newpw]; $md5pw = md5($newpw); $query = "UPDATE sut_users ". "SET password = '$md5pw' ". "WHERE username = '$username'"; mysql_query($query) or die('Error : ' . mysql_error()); echo 'complete'; ?> [/code] I would appericate it, if you could help me figure why its not working. Sorry im alittle new to php... :) thanks, unenergizer
×
×
  • 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.