Jump to content

AbraCadaver

Staff Alumni
  • Posts

    1,893
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by AbraCadaver

  1. Model? Performer? Is this a porn gallery?
  2. If that is really the case, then it is probably because you are using the relative ../path/etc.
  3. And when you open in Windows Explorer and from the browser do they open in the same app?
  4. Using the concept above, likely you would use an array. Also, you need to wrap the table in a form and have a delete/submit button: echo "<td><input type=\"checkbox\" name=\"records[]\" value=\"$row[id]\"></td>"; Then on the receiving page you could implode() and use in an IN clause: $ids = implode(',', array_map('intval', $_POST['records'])); //DELETE * FROM table_name WHERE id IN ($ids)
  5. Need more info. What do those vars contain and what should the href look like? And are you trying to make a clickable image?
  6. Just for completeness, because I could see someone coming back and asking, if you want to store/use the dates as well: array_multisort(($times = array_map('filemtime', ($files = glob("$path/*.*")))), SORT_DESC, $files); foreach($files as $i => $file) { echo "<a href='$file' target=\"\_blank>".basename($file)."</a> : ".date("Y-m-d", $times[$i])."<br />\n"; }
  7. You had a lot of unneeded code. The one line lists all files and sorts them by date descending. There are different ways to handle the path, but this should work fine: $path = "../FOLDER/Subfolder"; array_multisort(array_map('filemtime', ($files = glob("$path/*.*"))), SORT_DESC, $files); foreach($files as $file) { echo "<a href='$file' target=\"\_blank>".basename($file)."</a><br />"; }
  8. There are some CSS styles that may work in some browsers, but jqury probably: https://www.google.com/search?q=jquery+scrollable+table
  9. Edit: Just saw it was an object, I was thinking string: var_dump($price); Depends on what echo $price; shows, but most likely: $price = (float)$preownedinfo->Price; //or $formatted_price = number_format((float)$price
  10. Very nice! One liner: array_multisort(array_map('filemtime', ($files = array_map('basename', $files = glob("path/*.*")))), SORT_DESC, $files);
  11. The best thing to do would be to create a tmp dir or something and point phpthumb to that dir and let it manage stuff.
  12. Not my favorite, but fewer ifs for illustration. Short-circuit and fail on the first false: if ($role == 'admin' && isset($_POST['user_email']) && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL) && get_user_by('email', $_POST['user_email']) { update_user_meta($userID, 'wp_user_roles', '10'); if (get_user_meta($userID, 'wp_user_roles', true) != '10') { wp_die('An error occured!'); } }
  13. Validate and sanitize filters are different. Sanitize will change it to make it "safe" and validate tells you whether it is valid or not.
  14. Yes, the print_r() from 2 hrs ago would've shown this
  15. Depends upon what you need. What are you hoping that will do? Make it safe for what?
  16. Really? The email that I use for this site as well as many others is nospam@mydomain.net. Also, what about johnbass or summacumlaude? You are just asking for lots of trouble here.
  17. I'm looking at your second block of code. You are not passing name from the form, so change to this: $uc = mysql_real_escape_string($_POST['uc']); //remove //$name = mysql_real_escape_string($_POST['name']); $mobile = md5(mysql_real_escape_string($_POST['mobile'])); //change this and remove $name $checklogin = mysql_query("SELECT * FROM users WHERE uc = '".$uc."' AND mobile = '".$mobile."'");
  18. $_SESSION['uc'] = $row['uc']; $_SESSION['name'] = $row['name'];
  19. $form_fields is an array. You can't just stick it anywhere. I might do: if(count($_POST) != count(array_filter($_POST))) { //form fields are empty }
  20. Should be this simple I would suspect: while($row=mysql_fetch_array($result, MYSQL_NUM)) { $xls->addRow($row); } EDIT: Or looking back at your example: while($row=mysql_fetch_array($result, MYSQL_NUM)) { $data[] = $row; } $xls->addRow($data); Not sure what addRow() is expecting.
×
×
  • 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.