Jump to content

peranha

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by peranha

  1. no, most websites will send you a new password in an email, not the original one. if they do send the original one, they may have built their own 2 way encryption so they can retrieve passwords after encrypting them.
  2. mysql_select_db($db) or die ("Sorry, that Mysql database is Invalid!"); Just like that, change the DIE message to whatever you want it to be.
  3. http://en.wikipedia.org/wiki/MD5 you can read that, there are algorithms there, so if you want to figure out how to unhash it, go ahead.
  4. md5 is one way encryption. There are rainbow tables out there, but if a salt is being used, they are kind of useless.
  5. .maintable {border: 1px ; width: 800px; padding: 1px; background-color: navy; align: center ; margin: 2% auto 0 auto;} /*main table for forum*/ that should work, works for me. it aligns the left and right to auto which will center.
  6. This is his first post, he says it outputs what he needs, he just wants it in DESC order. Which is what P2grace did.
  7. if($AllInfoEntered=0){ should be if($AllInfoEntered == 0){ you want to compare, not set to 0. that is what I can see right now
  8. if((strlen($hometel) == 10) and (is_numeric($hometel))){ that should work, you forgot the last ) closing the whole if statment.
  9. Yes there are changes, P2grace added DESC at the end of the queries. Try what he suggested, it should work.
  10. just change the number after LIMIT to what ever number you want to limit the posts returned to, and if you dont want to limit the number of posts, get rid of the LIMIT at the end, just end at rand()
  11. Do you mean something like this? // create query $query = "SELECT * FROM table ORDER BY rand() LIMIT 1"; that would be for a sql database. It would select 1 random post.
  12. Incorrect. Instead do this: <textarea DISABLED></textarea> What is wrong with that, it works fine and it validates with w3c, after all that is where I got if from. Just asking, not trying to get into an argument.
  13. READONLY = "TRUE" Add that to the text area, or text field <textarea READONLY = "TRUE">
  14. Try this, it is not correct for design, but may work <center> // table and page here. </center> I used this before, and got hit hard with negative feedback.
  15. you would use join statements // create query $query = "SELECT F.facilityname, M.miscid, M.building, M.camloc, M.cammount, M.notes, M.serial, M.dateinst, C.model, C.colorbw, C.type, C.lens FROM facility_cameras FC INNER JOIN facilities F INNER JOIN cameras C INNER JOIN misc M ON FC.facilityid = F.facilityid AND FC.cameraid=C.cameraid AND FC.miscid = M.miscid ORDER BY F.facilityname, M.building, M.camloc;"; facility_cameras is a table facilities is a table cameras is a table misc is a table
  16. Where are you connecting to the database? Also, this should be at the beginning of the file. if(isset($_POST['save'])) { $update =mysql_real_escape_string($_POST['content']); $query_update = "UPDATE hayleyedit SET content = '{$update}' WHERE page_id = '{$page_id}'"; mysql_query ($query_update) or die("Error:" . mysql_error()); }
  17. <?php // Function to abbreviate characters after search. function truncate($string, $max_chars = 60) { if(strlen($string) > $max_chars) { $string = substr($string, 0, $max_chars).'...'; } return $string; } ?> you could use that, it will shorten to 60 characters.
  18. pageid = $_GET['edit']; yeah, fixed it, didnt realize that. Working on too many things at once I guess
  19. you need session_start() at the top of every page that you are checking sessions on. <?php session_start(); if (!isset($_SESSION['username'])) { header("Location: login.php"); //back to the login page } ?>
  20. This is what I use not sure if it is the correct way, but it validates with w3.org width: 1050px; margin-left: auto; margin-right: auto;
  21. Download this mod, and install it under Admin and packages http://custom.simplemachines.org/mods/index.php?mod=7
  22. try this $c_avg =("SELECT AVG(a_concept) FROM $tbl_name2 WHERE question_id='$id'"); Took out the quotes from the table name
  23. $cavg1 = mysql_query($cavg) or die ("Error in query: $query1. ".mysql_error()); change the query line to this and see if there is any errors there The code I gave you works fine for me. and take out the echo ($c_avg1); line
  24. yes, method="POST" and on the save.php page, you would use $pid = $_GET['pid']; $mynotes=$_POST['mynotes'];
×
×
  • 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.