Recent Topics

1 Jul 13, 2006 04:41    

Hi,

I'm totally new here and dont know much about php.
anyway

I was wondering if I could do this. I want random text on my website. BUT I want the random text to come from a pool of names that I already have. I want the text to change every 3 or 4 seconds. So for instance.

It would look something like this...

Billy uses b2evolution
sam uses b2evolution
becky uses b2evolution
do you?

can this be done with php? or flash? how can I do this?

thanks.

2 Jul 14, 2006 10:30

PHP for the backend, javascript or flash for the front end.

I use to be a pro-flash guy, did everything in flash, but then when i discovered the power of php and javascript i rarely use flash.

Anyway, to do it via php and javascript you would;
Get php to grab a the list, then echo it inside your javascript code.
Then use javascript to make a timer, and each cycle of the timer change the text via making a random number between 0 and the user list size-1 inclusive, then extract the name via the array with the generated number.

You should be able to figure it out by googling and fidling around, learning by yourself is good :)

Anyway if you have trouble i can't help you until after the 20th... I shouldn't really be helping you now ;)

3 Jul 15, 2006 00:48

Thanks... I found a javascript code that I tinkered with and got it to work.


Form is loading...