-
Posts
104 -
Joined
-
Last visited
Never
Everything posted by thecard
-
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!
-
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.
-
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
-
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.
-
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?
-
But it doesn't
-
Then it just echos the string: images/hitcounter2.png .
-
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.
-
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.
-
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.
-
Yeah...hope u realise that it would not be good to be able to run it in browser...
-
<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
-
calling a function multiple times with different param's
thecard replied to nicktherockstar's topic in Javascript Help
Click "topic solved". -
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
-
[SOLVED] Storing information: urls and emails in a database.
thecard replied to thecard's topic in PHP Coding Help
Yeah thanks. That was a bit too lazy of me. *solved*. -
[SOLVED] Storing information: urls and emails in a database.
thecard replied to thecard's topic in PHP Coding Help
But will the mysql_real_escape_string(,); take out the <> anyway? -
[SOLVED] Storing information: urls and emails in a database.
thecard replied to thecard's topic in PHP Coding Help
How do I do that? Just mysql_real_escape_string(,); ? -
What can't you do?