Re: [linux-audio-user] off topic - web developement mailing lists similar to this one?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] off topic - web developement mailing lists similar to this one?
From: Joe Button (linux-audio-user_AT_joebutton.co.uk)
Date: Thu Jun 03 2004 - 12:25:13 EEST


On Thursday 03 Jun 2004 11:43, Aaron Trumm wrote:
> Hello y'all - this is WAY off topic but I am not connected to any web
> developement lists - does anyone know of some, where people are great like
> here and can help with web devel questions?

I used to hang out in the uk.net.web.authoring newsgroup, although I haven't
so much recently. Don't know any mailing lists though.

> ps:
> what my question is is this: I want to have a script that will rotate
> between different content pages, so say user 1 hits the site, they see
> "blah blah1" and user 2 hits the site they see "blah blah2" and so on...

If I understand you correctly, you effectively just want a random piece of
content served each time the script is run. Basically this should be very
simple eg I think this should work in php:

<html>
<head><title>Random content</title>
</head>

<body>
<p>...Your page layout / chrome etc...</p>

<?php
$randomNumber=rand(0,2);
switch($randomNumber) {
case 0:
        echo "Blah1";
        break;
case 1:
        echo "Blah2";
        break;
case 2:
        echo "Blah3";
        break;
}
?>
<p>..More layout stuff...</p>
</body></html>

That's the basics of what you're asking for, although there are lots of
options for complicating it, eg. putting your content in a database,
remembering users etc.

HTH


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jun 03 2004 - 12:19:50 EEST