Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Just use this... $content = preg_replace('#<script type="text/javascript">(.*?)</script>#s',"[*SCRIPT*]",$content);
  2. I imagine it would depend on the website really, what's the site about? It would probably be worth drawing up a contract to cover both parties.
  3. I agree with blmg911 and Dj Kat, lacks functionality, a community. Just seems like random people, you can't really view any profile information or anything about them before you talk to them.
  4. Do you mean asynchronous? In an AJAX sense, to put it simply, it's the HTTP request kind of working behind the scenes - 'asynchronously' - to the rest of the site. It quite literally means "not at the same time". So you can have several HTTP requests all working at the same time, asynchronously to each other and the rest of the site. If that makes sense?
  5. Give this a try: if (preg_match_all('#<script>(.*?)</script>#s', $str, $matches)) { print_r($matches); }
  6. You'd need it installed on the server. PHP is a server-side programming language, which means it can only communicate with the server and not the user.
  7. Adam

    Images

    which should solve your second to last point * .. I meant. Yeah as alexdemers said. Not only that though, images re-sized by the browser look awful anyway. Definitely worth investing a bit of time into learning how to re-size them with PHP.
  8. ..And they say he's the immoral one!
  9. Adam

    Images

    You should be able to follow tutorials and pick up how to complete most of the steps. Also the move_uploaded_file function will overwrite the destination file if it already exists, which should solve your last point if you always name the image the same thing, perhaps md5 hash of their username or something?
  10. Nice one! What do you do in the competition?
  11. How do you mean it doesn't want to show them? What is shown, or, what happens?
  12. Oh dear, silly oversight. Should be: $waar = date("d-m-Y");
  13. I posted a reply in the other post. http://www.phpfreaks.com/forums/index.php/topic,263424.0.html
  14. The syntax is completely wrong. Should be: $waar = ("d-m-Y"); switch ($waar) { case "04-08-2009": echo '<img src="http://temp.com/wp-content/6Aug.jpg" alt="Los Angeles">'; break; case "05-08-2009": // ... break; }
  15. Adam

    Presentations!

    Oh god, don't sound good! They're awful I think, I wasn't born to present!
  16. Well today I had to give a presentation to 30 of the big bosses that I've been practicing for about a month now, scariest morning of my life! Finally done though and I did 'great'.. they said! Anyone else have to do stuff like that for work, or anything else?
  17. You have to escape quotes if they are within quotes, i.e: "<a target=\"mainframe\" href=\"../forms/Contest/contest.html\">Win My Windows</a><br> " + Note the added slash after 'mainframe'. You'll need to add that target to each link you want to open within the frame.
  18. If you want to match everything, I'd add the 's' modifier to match new lines as well: /<\!-- open tag -->(.*?)<\!-- \/ open tag -->/s
  19. Theoretically and syntactically, both examples should work (maybe give or take a parse error). The problem will be in your implementation. How did you have it?
  20. I think you are looking at this wrong. Search engines don't access the database in that sense, only pages containing data. You must have the data somewhere on your site, in a reachable path, for search engines to index it.
  21. Not bad, the mark-up looks well done. Not keen on the design though, looks quite dated and bland. Perhaps change the font, make the images look a bit more appealing, remove the double footer, just generally give it a bit more detail and visual appeal.
  22. What problems does the problem code give? Are you seeing the MySQL error? A PHP error? If not, what output are you seeing?
  23. This might be of use: http://www.phpclasses.org/browse/package/4550.html
  24. Hmm, could you show a screen shot? I can't really picture what you mean...
  25. You'd need to test the value of the page variable and use the correct header. Rather than a complicated series of IF .. ELSE statements though I'd use an array: $header_images = array( 'page_name' => 'corresponding_image.jpg', 'about_us' => 'aboutus.jpg', ); if (array_key_exists($_GET['page'], $header_images)) { $header_img = $header_images[$_GET['page']]; } else { $header_img = 'default_header.jpg'; }
×
×
  • 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.