Jump to content

hansford

Members
  • Posts

    562
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by hansford

  1. $ids = array(); foreach($menu as $array) { $ids[$array['id']] = $array; } ksort($ids); $menu = array_values($ids); print_r($menu);
  2. What results are you expecting? dirname() // returns the path to the parent directory of the passed path value
  3. If they waned their content to be shared they would have an API which you could tap into. Site scraping can open you up to legal battles etc.. Not a place a legitimate web development operation wants to be.
  4. If you absolutely need the html extension you can add an .htaccess file to the folder with the following code: RewriteEngine on RewriteRule ^(.*)\.html $1\.php However, simply naming it with the correct extension would be the better option.
  5. Make a connection to the database. Query the database for the information you require. Then use a loop to display each row returned from the query. <?php $con = new PDO('fill in information here'); $sql = "SELECT image_url, project_name, email, skype_id FROM TableName"); foreach($con->query($sql) as $row) { ?> //html mixed with embedded PHP code goes here //where you need to grab something from the database to fill in the blanks use: //<?php echo $row['image_url']; ?> etc etc }
  6. Sounds like you are in over your head. As the Admin told you, you need to add a password field to the form. <tr><td><label class="">User Password</label></td><td><input type="password" name="userpass" id="userpass" width="200" value="<?php echo $memberedit->password;?>" onblur="checkPass(this.value)"></td></tr> You should actually have two fields...one for the password and another to confirm that they typed the password in correctly. You are then going to need to write a javascript function checkPass() to validate the password for acceptable length, chars etc. You will need to fill in the password form value from the database just as the code does with the other field values. You will need to add additional sql to update the database with the password field value. It looks like the admin gets sent an email after an update, so depending if he wants to know the password used, you will have to add this to the email form as well.
  7. I don't know what you plan on loading the pdf file into. I used an iframe as an example. If you wanted the whole page to open the pdf file you could just use: document.location = selection; <H3><B>My Notes</B></H3> <select name="mymonth" id="mymonth"> <option value="" selected>Select Pdf File</option> <option value="FF_Mar06.pdf">Mar 20</option> <option value="FF_Mar13.pdf">Mar 13</option> <option value="NotAvail.pdf">Mar 06</option> </select> <script type="text/javascript"> var pdfSelect = document.getElementById('mymonth'); pdfSelect.addEventListener('change', function() { var selection = this.options[this.selectedIndex].value; var frame = document.getElementById('pdf_frame'); frame.src = selection; }); </script> <br /> <iframe id="pdf_frame" src="" width="100%"></iframe> </body>
  8. It works fine. You just need to call the load() function like so: window.onload = load;
  9. Notion, I've been working on this too since our last post regarding this. password_hash() returns a string. The manual posts this: /** * We just want to hash our password using the current DEFAULT algorithm. * This is presently BCRYPT, and will produce a 60 character result. * * Beware that DEFAULT may change over time, so you would want to prepare * By allowing your storage to expand past 60 characters (255 would be good) */ So I would assume we would need a varchar() or char() capable of holding 255 characters.
  10. Please post all relevent code.
×
×
  • 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.