I have about 25 or so images that I would like to serve up on my site's home page. I
would like the image to change every 3 days or so. Does anyone have a hint as to how I
might go about doing this in a simple fashion?
I don't want it to be random, but I do want it to cycle through the images
Donny wrote:
can we make simple codes in-line instead of function
calls?
or, it makes no help in PHP?
Donny, can you please explain what you mean by this, perhaps with a code sample? I am
not really sure what you are asking.
Matthew Horn
Principal
Spielboy.com
--
PHP Database Mailing
So yes, it's possible with PHP. Is it worthwhile? Eh, maybe. But just
realize the overhead that you'll be putting on a busy site
with a DB entry
for EVERY page view - even for pages with no dynamic content
(not to mention
any pages that might require real DB querying).
Why not use
It's an issue of using POST instead of GET and has nothing to do with
PHP. Most browsers won't re-post POST data for you for security
reasons. GET, however, is just a URL with a query string, so it simply
requests it.
Assuming you can't re-write the POST inputs as GETs, is there a way around
Remember, though, you can't set an HTTP header after you've sent output to the client,
so you needc to do your redirecting (assuming there's a condition) before you display
ANYTHING.
BAD:
HTMLBODY
if (somecondition) { Redirect(www.mypage.com); }
...
GOOD:
?php
if (somecondition) {
My apologies for the large email, but I wanted to include all the source code for
interested folks and thank everyone who provided suggestions for implementing hot or
not-like functionality.
Here is what I ended up doing. I've stripped out alot of the formatting to make it as
readable as
I am toying with the idea of implementing functionality similar to the hotornot.com
site -- for a different purpose, mind you, but the same kind of user experience.
Here's what it does:
1. A picture is served up.
2. User clicks on a radio button scale from 1 to 10 to rate the picture.
3. The
Ex.
$number = @mysql_num_rows($result_var);
Having a bit of a brain cramp right now as I normally do not suppress
errors. My apologies if I'm wrong.
The at sign works fine for suppressing error messages from mysql, but I usually have
it at the beginning of the assignment, as in:
@ $number