Jump to content

FlyingIsFun1217

Members
  • Posts

    178
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.MechGame.co.nr/

Profile Information

  • Gender
    Not Telling
  • Location
    Here

FlyingIsFun1217's Achievements

Member

Member (2/5)

0

Reputation

  1. Basically, the problem I have with any of these proposed solutions is that an error is thrown when I run the script and don't supply a GET variable in the URL (which is a possible case in real-world use). When the PHP interpereter sees that I am referencing $_GET['post'], and it has nothing in that GET array, it freaks out and throws me an error. Is this maybe just my server/PHP setup? FlyingIsFun1217
  2. So GET can be set, but still be empty? That would be the case with the "Page 1" if conditional. FlyingIsFun1217
  3. Hey, I'm trying to get a page that goes through different situations via the GET variable. Because of this, I need to be able to deal with not having anything in the GET array (if the user just goes to x.php). The way I have it now is something like such: if (!array_key_exists('page', $_GET) && !empty($_GET)) { //Put in template code for error page print 'Wrong GET name!'; } else { //Page 1 - Welcome, process explanation if($_GET['page'] == "1" || empty($_GET)) { //Page one output! print "Page 1 / Empty"; } } Now, I know there's something wrong here, in the fact that if I run the script without passing a GET variable, I get a warning/error, because $_GET['page'] isn't set. How can I get around this? Is there no way to supply results for both scenarios? Thanks FlyingIsFun1217
  4. I'm not saying it should, I actually think the other browsers are "in the wrong", so to speak. My only interest is that every other browser seems to fix it. Makes it seem like Firefox is not doing things right when it works with everything else. FlyingIsFun1217
  5. Ok, I see what's going on now. Any reason Firefox is the only browser that can't fix my mistake? Seems odd that it wouldn't be able to make up for it like all of the other browsers. Thanks! FlyingIsFun1217
  6. I've uploaded my example to http://www.ploronex.com/it109/password.html. I still can't see what's causing a problem at all, and it seems when I change 79 to a lower value, it doesn't work in other browsers. Man, this is starting to confuse me. Guess that's what I get when I don't know javascript well. Thanks for any further guidance, I appreciate it! FlyingIsFun1217
  7. Hey, here's what I've got. Seems to work in IE, but not Firefox. Any clue? <script language="javascript"> function random_passwd() { chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*"; password = ""; for(x=0;x<9;x++) { i = Math.floor(Math.random() * 79); password += chars.charAt(i); } return password; } function formSubmit() { generatorForm.passwdBox.value = random_passwd(); return false; } </script> <form name="generatorForm"> <input name="passwdBox" type="text" /> <input type="button" value="Generate New Password" onClick="javascript:formSubmit()" /> </form> Seems that it works in Chrome, IE, but not Firefox. Is there some little Javascript snippet that Firefox does not support currently? Thanks! FlyingIsFun1217
  8. Solved! Turns out I'm using the table name 'Users' in the rest of my stuff... Gah. FlyingIsFun1217
  9. Hey! I've got a login script as such: login.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "XHTML1-s.dtd"> <html> <head> <title>Ploronex TMS Login</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="header"> <h1>TMS</h1> <h2>Ploronex Development Team</h2> </div> <div id="container"> <div id="primarycontainer"> <div id="primarycontent"> <!-- Primary content start --> <br></br> <?php if($_GET['rslt'] == '1') { echo '<div id="loginerrorbox">'; echo '<b>Invalid Login Credentials!</b>'; echo '</div>'; echo '<br>'; } ?> <div id="loginbox"> <center> <table> <form action="loginAction.php" method="post"> <tr> <td valign="middle">Login ID</td> <td valign="middle"><input type="text" name="UserName"></input></td> </tr> <tr> <td valign="middle">Password</td> <td valign="middle"><input type="password" name="PasswordMD5"></input></td> </tr> <tr><td><p></p></td><td><p></p></td></tr> <tr> <td></td> <td align="right"><input type="submit" value="Log In"></input></td> </tr> </form> </table> </center> </div> <!-- Primary content end --> </div> </div> </div> <div id="footer"> © 2008 Ploronex. Design by <a href="http://www.nodethirtythree.com/">NodeThirtyThree</a>. </div> </body> </html> and loginAction.php: <?php include('dbsInfo.php'); include('dbsConnect.php'); $loginID = $_POST['UserName']; $loginPass = md5($_POST['PasswordMD5']); $SQLID = 'SELECT UserName, PasswordMD5 FROM users WHERE UserName="'.$loginID.'"'; $userData = mysql_fetch_array(mysql_query($SQLID), MYSQL_ASSOC); if($userData['UserName'] == $loginID) { if($userData['PasswordMD5'] == $loginPass) { setcookie('UserName', $userData['UserName'], time()+3600); setcookie('PasswordMD5', $loginPass, time()+3600); echo '<script type="text/javascript">'; echo 'window.location = "index.php"'; echo '</script>'; } else { echo '<script type="text/javascript">'; echo 'window.location = "login.php?rslt=1"'; echo '</script>'; } } else { echo '<script type="text/javascript">'; echo 'window.location = "login.php?rslt=1"'; echo '</script>'; } ?> I've been looking over it for hours now, and I just can't figure this one out... It works perfectly fine on my local computer (which is windows, I'm developing with Xampp), but when I go to use it on a remote server (which is running Debian), I put in my login credentials, and it flashes (VERY fast) an error, I believe. It then immediately redirects me back to login.php, no error or anything, just cleared fields. Surely this cannot be because it is reading information that is not kosher from the database... I am using a backup of my local database (which again, works fine) on the remote server. I'm REALLY hoping somebody is going to spot a stupid error on my part. It's been driving me nuts! Thanks! FlyingIsFun1217
  10. Cool. It seemed like a decent method to me, but it was sort of a last minute thought as I was posting, and wasn't sure if it was really viable. I'll try it out! Thanks! FlyingIsFun1217
  11. Hey! So, what I've got is a private system, but I need people to be able to register for it. What I'd like to do is somehow let the Administrator set up an account with a username and email, but let the user set his own password, instead of having to give it to the administrator. I can't really think of any solutions to this. Is there a way to verify an incoming visit from a certain email address? And would that really be a secure way of dealing with it? Would it be just as secure for the server to create a random string for a url like http://www.website.com/signup.php?eid=23n2j3b23j, and send that to the user, and check to see that it's the url the person is going to? Guess I'm just looking for some ideas for solutions. Thanks! FlyingIsFun1217
  12. Perfect! Exactly what I was looking for! Thanks! FlyingIsFun1217
  13. Hey! Hopefully I was able to sum it up fairly well with the title: I need to figure out a way to insert values into a table, giving NULL for one field that has auto_increment as a property, and then find what value was given to the field with the auto_increment field, so that I can use it in later operations. Thanks! FlyingIsFun1217
  14. Busy at the current moment, but a quick overview seems to show that being just what I was looking for. Thanks! FlyingIsFun1217
  15. Hey everyone! Long time no see Anyway, my current task involves designing a system to track tasks assigned by leaders of a team, to members of the team. Currently, I've got a system to log users in (that wasn't a problem at all), but what I need help with is the design for an unlimited amount of tasks. Essentially, I'd like each user to be able to have multiple tasks, each holding some info (such as status, assignee, assigner, original date, etc.). What I'm not sure on, is how to set up the database to handle such problems. I want to keep all tables for the system in one database, including the table I have for users. Should I keep one huge table for each task? Have each task be a table? If I had each table be a task, how would I know which tasks were for which users (assuming that I have a HUGE amount of tasks, and a huge number of users)? Thanks for the help on this! I really appreciate it! FlyingsFun1217
×
×
  • 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.