Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. thats because the words "guitars" isn't in the name or description. You have a multitude of options. You can add a tags column to your DB, so you can put different tags in (like guitar, guitars, etc) You could also trim s's from the end of strings. you could use rtrim() for this. this might be a bad idea though, as taking of random characters from the end of strings could have unwanted results.
  2. The exact data would be more helpful. IS that it, or is there more (It seems like there is more, you have that etc... there)
  3. If you want a system like Mafia Wars has, you will have to look into AJAX. clicky
  4. I don't know what your data looks like, so I can't tell you what your query should be. If you want to match any columns with the word inside of it, then use '%$var%' if you just want to match different endings (IE match to the beginning of the word) use '$var%'. If you want to match the end of the word, use '%$var'
  5. $string = "adf9a8sdf__--==..,,''@"; $eregi = preg_replace("([^A-Za-z0-9@]+)","",$string); echo $eregi
  6. add the characters to the pattern? "([A-Z0-9@]+)"
  7. Something like '%$trimmed%' will match to the word, and the word inside anything. so if you searched guitar, it would return guitars, bass guitar, electric guitars, etc. The % is a wildcard, and since you apply it to both sides, it means that anything could be next to the search term. If you want just the word, and like plural variations, and stuff like that, '$trimmer%' might work. That would match a search of guitar with guitar, guitars. However, watch out for abnormal english words where the plural is different from the singular
  8. I think OP meant concatenation. adding a small amount of characters (or a large amount) to a string is called concatenation. $string = "pumpkin"; $plural = $string."s"; is that what you meant
  9. I would go with the parent message hierarchy. Both ways run the risk of users changing the information that was sent.It would also probably be a bit easier to generate any parent messages that go with it.
  10. Ok, that means that your $_FILES array is empty. Are you sure you are submitting it correctly? can I see the form? you need to set the enctype of your form to "multipart/form-data" when uploading files
  11. it depends on how you want to design your system. Whereever you send the post variable is where you want that code
  12. If you are the only one that visits that page, then I guess it would be OK. Why do you want to make the server sleep for a minute tho? I can't really think of a reason that this would be beneficial
  13. because you have a syntax error. add error reporting to your pages when developing error_reporting(E_ALL); ini_set("display_errors", 1); but the problem is here "<a href=".$row['websitelink'].">".$row['websitelink']."</a>" "{$row['websitelink']} <br><br>" ; you didn't concatenate those two strings "<a href=".$row['websitelink'].">".$row['websitelink']."</a>" . "{$row['websitelink']} <br><br>" ;
  14. you would get the username from the $_GET variable, $username = $_GET['username']; and then do whatever you need to with that username. probably have to make a query that gets all the tutorials based on that username if I understand you correctly
  15. Tell me a single thing they do understand, besides how to make bad matters, worse. the most effective way to waste tax money?
  16. You can use php's sleep() function. 1 minute is a little long though, and you could end up DDOSing your own server if you have this on a page that a lot of people visit
  17. $query = "SELECT results, address, phone, websitelink, maplink FROM pickastate WHERE type='Attractions'"; ?
  18. Well there goes my hopes of doing anything productive at work today
  19. $Gadgets->$Site[$x]->XXX Wherever you see occurrences like that, it should be $Gadgets->Site[$x] The method you were using previously is using what are called variable variables, which is probably not what you want
  20. this strpos(trim($_POST['email'],'@')) === false should be strpos(trim($_POST['email']),'@') === false your parentheses were formatted incorrectly edit premiso beat me to it, nevermind
  21. I suggest your turn error reporting on error_reporting(E_ALL); ini_set("display_errors", 1); so that PHP will tell you when you have undefined indexes. It seems like the $_FILES array doesn't have what you expect it to. Try adding print_r($_FILES); in your code to see what the structure of the FILES array is
  22. from google searches it seems to be a deassembler or decompiler, but im not sure
  23. just use a loop? $language = $_POST['language']; //other stuff $message = "whatever";//whatever comes before the list foreach($language as $lang){ $message .= $lang."\r\n"; }
  24. What error are you getting?
  25. try posting the code you have
×
×
  • 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.