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. Any ideas on how you implement a button that you can gaze at and click. I built the app using JavaScript, but I have no clue on this magic button thing. Thanks
  10. Requinix is right - post the rest of the code. And is the charset set to match the chars in the database. Content-Type: text/html; charset=utf-8
  11. <form> <select name="users" onchange="showUser(this.value);drawChart();"> you call it drawChart() but pure JavaScript - not jQuery which is your ajax call. Re-post in the JavaScript forum.
  12. Where is your development site. Two sites - exactly the same - one to screw up, test etc and one for the public.
  13. Nothing weird - perfectly normal - do the research.
  14. echo html_entity_decode('—', ENT_COMPAT, 'UTF-8');
  15. Don't know what you mean .. put them in there. Pass the db connection or array returned from the db call - whatever - let the function do the work.
  16. You can throw errors all day long - don't waste the time. A critical error - DB ect - log it - but there is zero recovery - tell your users - 'hello' is about it. Another less critical-error - ok, continue on with a polite message. But - error checking every thing will just drive you crazy and won't do anything in the end.
  17. And is the data coming from the database. Character corruption.
  18. Welcome #2 You are a programmer - no gentle for you lol
  19. Croatia! - hold on...let me Google that lol Welcome.
  20. Over my head as well - Jacques - concrete example in PHP.
  21. Ugly, but great question - we will find you an answer.
  22. That is not an htaccess file
  23. async: false, Remove that line - you want it to be async. Set a change handler on the drop down to call the ajax every time a change occurs and update the data.
×
×
  • 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.