Jump to content

monkeypaw201

Members
  • Posts

    376
  • Joined

  • Last visited

Everything posted by monkeypaw201

  1. The real question is: How will you interface with your AV? The rest is easy first perform the usual security checks, size allowed etc.. Allow uploading to a temp setup a cron that every (for example: hour) will trigger the AV check if ok upload to final destination, if not del and ban sender if any one knows how to trigger an AV selective search then you will be all set
  2. Third_Degree... no, i actually figured out if i manage to convert decimal time to standard time, it would save time and make the code look neater, sorry for the confusion.. BTW: It was helpful though
  3. Is there a way to easily convert decimal time to time in the format: 00:00 ?
  4. I need to retrieve the last 2 letters of a string. Is there a reverse substr() function?
  5. I have a database with a time column where i insert the time using the date("now") function.... I need to be able to add 24 hours... Using that new variable i need to find out if that date/time has already passed or not. So.. 1. How do I add 24 hours? 2. Will $added_time < $date("now) work for an if..else?
  6. Yes, this is the login.php, I updated the = to == and it didn't change anything.. I also added an echo $_POST['pilot_id']; right after the first query and its not outputting anything...
  7. Not being an expert here.. i but i would say its a resource issue, that the script runs out of resources and dies..
  8. I tried making a login page but it doesn't seem to posting anything... <?php if(isset($_POST['submit'])) { mysql_select_db("database", $connection); $password = sha1($_POST['password']); $user = mysql_query("SELECT * FROM `users` WHERE `pilot_id` = '" . $_POST['pilot_id'] . "' AND `password` = '" . $password . "'") or die(mysql_error()); $user_count = mysql_num_rows($user); if($user_count = 1) { $_SESSION['pilot_id'] = $_POST['pilot_id']; }else{ echo "<p align=\"center\"><font color=\"red\">Sorry, the Pilot ID and password combination you provided was not found, please try again.</font></p>"; } }else{ ?> <form name="loginbox" method="post" action="login.php"> <table width="100%" border="0"> <tr> <td>Pilot ID</td> <td><label> <input type="text" name="pilot_id" id="pilot_id" value="COR" size="10" maxlength="7"> </label></td> </tr> <tr> <td>Password</td> <td><label> <input type="password" name="password" id="password" size="10"> </label></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2"><label> <div align="right"> <input type="submit" name="button" id="button" value="Log In"> </div> </label></td> </tr> </table> </form> <?php } ?></code]
  9. Alright, I removed the disabled, and replaced it with read-only and added css to grey it out... and it works. thanks!
  10. @samshel : I tried that and it turns out that the POST variable key is not posting correctly. I'm not sure why though... @revraz : problem is now in the form
  11. Ok, thanks, this is the code for the form ... i checked th variables.. but did i miss something? <form name="form1" method="post" action="confirm.php"> <table width="100%" border="0"> <tr> <td>Activation Key:</td> <td><label> <input type="text" name="key" id="key" <?php if(isset($_GET['key'])){ echo "value=\"" . $_GET['key'] . "\" disabled"; } ?> /> </label></td> </tr> <tr> <td>E-Mail Address:</td> <td><label> <input type="text" name="email" id="email" /> </label></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2"><label> <div align="center"> <input type="submit" name="submit" id="button" value="Activate Account & Log-In"> </div> </label></td> </tr> </table> </form>
  12. I am getting these errors when i run this code: mysql_select_db("database", $connection); $user = mysql_query("SELECT * FROM `users` WHERE `activation_key` = '" . $_POST['key'] . "' AND `email` = '" . $_POST['email'] . "'") or die(mysql_error()); $row_user = mysql_fetch_array($user); $user_count = mysql_num_rows($user); and im not sure what it means
  13. I posted the code below, i personally can't find anything wrong with it and have triple-checked spelling and the form names etc... $user = mysql_query("SELECT * FROM `users` WHERE `activation_key` = '$_POST[key]' AND `email` = '$_POST[email]'"); $row_user = mysql_fetch_array($user); $user_count = mysql_num_rows($user); the errors:
  14. Hey guys, i know its probably a simple question, but how do I check to see if a form has been submitted? I tried: <?php if(isset($_POST)) { echo "yes"; } ?> But it displays yes even if i haven't submitted anything.. any suggestions?
  15. The reason no-one replied is because you posted javascript not PHP ... if you post PHP code we can help
  16. http://www.google.com/search?hl=en&q=PHP+Email+Parsing&btnG=Search
  17. The code is just posting to same page and nothing happens... <?php if(isset($_FILES['file'])) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "File Uploaded Successfully"; if (file_exists("../downloads/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { $filename = date("siHdmY"); move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "../downloads/" . $filename; } } }else{ ?> <form method="POST" action="upload.php"> <p>Pilot ID:<br> <input type="text" name="pilot_id"> <p>File:<br> <input type="file" name="file"> <p>Title:<br> <input type="text" name="title"> <p>Description:<br> <textarea name="description"></textarea> <p>Author:<br> <input type="text" name="author"> <p><input type="submit" name="submit" value="Upload File"> </form> <?php } ?> NOTE: Its not done, but eventually it will insert Title, Author, Description, Pilot ID into database along with $filename.
  18. Works perfectly except the javascript alert doesn't work..
×
×
  • 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.