Jump to content


  • Posts

  • Joined

  • Last visited


Everything posted by OldWest

  1. To check if it's a valid pdf, you should probably use ereg("\.pdf$",$filename) .. Something along those lines.. And for the renaming of the file try rename("$originalfile_name", "$newfile_name")
  2. Just to clarify, are you trying to delete a record from a table based on the selected checkbox?
  3. I assume you have a server that runs (and its properly compiled) php? Please give a bit more insight into what you are working with here.
  4. That looks like something on the servers end you are trying to connect to. It's possible their server is configured to not allow this type of external "reading" or pulling of data... Just my first thought on it.
  5. And if you just need a count on the results, why not just use phps count() function?
  6. You can write a simple query like (not tested but should get you in the right direction): $query = "SELECT * FROM table1, table2 WHERE table1.model = table2.model"; Or instead of an INNER JOIN style as above, you might want to consider a RIGHT or LEFT JOIN depending on the exact results you are looking for.
  7. I did not really read through your entire thread in detail, so I don't know if this will even be of any use, but if the array pointer is starting at position 1 as opposed to 0, then your problem MIGHT happen, so there is a function to reset the array pointer back at 0 which is reset() .. you can find out more about it here: http://php.net/manual/en/function.reset.php
  8. Do you have a blank value in your mysql table field where this is being pulled from? Or you can probably reset() the fetched array back at 0...
  9. Do you mind telling me the basic reason (what use) you have in mind with repeating this data?
  10. I was thinking you were wanting to find/replace.. oops!
  11. str_replace and preg_replace
  12. I'm not sure I totally understand your question. Can you post some examples of the original data and expected output based on that data?
  13. Can you please rephrase what you are trying to do? Do you want to show all results regardless if either field is empty? OR What is the exact output you expect? Please clarify.
  14. Try this: $query = mysql_query("SELECT * FROM merchants WHERE subid = '$subid' AND (catid != "")");
  15. $query = mysql_query("SELECT * FROM merchants WHERE (subid = '$subid' AND subid = "") AND (catid != "")"); NOT TESTED! But this should do what you want I think... Give it a shot.
  16. semicolon is optional on this statement.
  17. You need to intercept that value on the new page with $_GET, give it a variable name, and echo it out in the select box as SELECTED on the new page: <SELECT NAME="partnumber"> <OPTION VALUE="7382" >steam turbine <OPTION VALUE="2928" >resistor array <OPTION VALUE="3993" SELECTED >widget analyzer <OPTION VALUE="9398" >fiber identifier </SELECT>
  18. $query = mysql_query("SELECT * FROM merchants WHERE subid = '$subid' AND (catid = '$catid' OR catid = "")"); - I did not test this, but I think this is what you are trying to do: Find all results where $subid and $catid have a match BUT also include $catids with no value (null)?
  19. When you say "once the page refreshed"... Are you referring to if someone refreshes the browser? or onto a new page following this form?
  20. die() is mostly used for database connectivity from my experience. You can simply echo like: if(!$email || !$subject || !$to || !$message) { echo "Please fill in all required fields"; }
  21. Have you tried this in several different browsers? Try Chrome, FF, IE, etc.. If you can... Also close out your statement with ; ...
  22. Can you post your code up with html?
  23. That should be fine. 20M is 20 MB I believe, so you should have plenty of room on those. Maybe you should post up your class.
  • 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.