Jump to content

thecard

Members
  • Posts

    104
  • Joined

  • Last visited

    Never

Everything posted by thecard

  1. Right: The img tag links to a .php file which loads an image after some mysql requests to make sure which one to load etc. I want the php file to send off this information (the timestamp etc. and more complex stuff) asynchornously to my database, so the best way to do this would be through javascript I think. But how can I link the javascript file with the xmlhttprequest and handler function to the .php file being used as the image? Thanks for your hard work. I assure you I have thought about this for a while without any results!
  2. The javascript will carry out AJAX -> php mysql querys which must be asynchronous
  3. Well that's annoying. Is there some other way to execute javascript FROM the image? Link it to another .php etc.? I can't work it out
  4. thecard

    Question

    Sounds like you should read a bit more into php tbh but anyways: So a user enters some text into a form and their comment/article is stored in the global variable $_POST (or $_GET). $string = $_POST['article']; stripslashes($string); Now your string won't have the unnecessary \s.
  5. Thanks, I'll try that when I get home. So I must rename the .js file to .php? Why might this make it work? I thought the reason it didn't was because I couldn't echo anything inside the .php file because it had img headers. As I said, I'll try it tonight. thecard
  6. I have an <img src="file.php" /> So this php file sets it's headers to look like an image and displays an image. But would it be possible for this php file to also carry out some javascript as well? I have tried echoing a link to a javascript file like this inside file.php: echo"<script src='js.js'></script>"; But I can see why this doesn't work..I think because once the headers are set inside the php file to be an image, it can't echo anything, and so can't even echo a link to javascript! How can I make a php file, "fired" through an <img> tag set off javascript functions from within the php file? ??? Thanks for any help. thecard
  7. Thanks sooo much to everyone in this thread! Your very helpful, good people. When I'm good enough to help people on the forums as you are, I will lots and lots to repay my dept to this great community.
  8. Thats AWESOME. Only problem is, how am I going to write a string onto (as in over) that image now from the counter.php file?
  9. But it doesn't
  10. Then it just echos the string: images/hitcounter2.png .
  11. Using that code mine comes up with: 'The image “counter.php” cannot be displayed, because it contains errors.' agh. Why? It's not the image I'm using, I've tried others...and this one is fine anyway! This is annoying.
  12. That didn't work. Still the symbol of a broken link. But now when I click "view image" all that shows in the new window is text saying the url /counter.php. . Thanks for the thought though.
  13. echo'<img src="images/hitcounter2.png" /> '; For now that is all it is. In the future it will echo the var on top of it.
  14. Yeah...hope u realise that it would not be good to be able to run it in browser...
  15. <img src="counter.php" height="50" width="450" border='0' /> The .php file echos an image with a variable echoed on top of the image. But all that appears on the page is the firefox sign meaning broken link or something... But when I right click the empty image and click "view image" I see the image in a new window how it should be so it isn't a broken link. I know this can be done. Where am I going wrong ???? Thanks for any help. thecard
  16. Oooo nice. Should save me time although I already did it all with substr .
  17. Thanks, that all makes sense. Dunno why I didn't think of that before.
  18. I want to be able to pass values after the # in a URL like: www.whatever.com#variablevalue Thanks.
  19. Would it be a security flaw to make a security/turin number which turned green when the user "got it right"? This would require AJAX of some sort. Would this in some way allow robots to keep having a go at it? Thanks for any help, thecard
  20. Yeah thanks. That was a bit too lazy of me. *solved*.
  21. But will the mysql_real_escape_string(,); take out the <> anyway?
  22. How do I do that? Just mysql_real_escape_string(,); ?
  23. Is it actually essential to stop users entering characters such as < or > or ' into a mysql database? I know it can be dangerous. But can't you just use prepared statements or something ???? Because it would be useful if I could store all characters in my database. Thanks for any help, thecard
  24. What can't you do?
×
×
  • 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.