Ok, basically what I am trying to do is everytime the page loads, the next thing loads.
For example:
Load 1: Text 1 loads
Refresh: Text 2 loads
Refresh: Text 3 loads
But it can be random as well.
Any help would be appreciated. :)
Ok, basically what I am trying to do is everytime the page loads, the next thing loads.
For example:
Load 1: Text 1 loads
Refresh: Text 2 loads
Refresh: Text 3 loads
But it can be random as well.
Any help would be appreciated. :)
load the information into a session variable, failing that put it into a cookie... or even use both o_O, store it in a session variable and the cookie, so that when the user comes back to the page it is on the page they were on before.
Start a session and store a variable in it, then make it so every time the page gets refreshed, the variable is incremented by one.
I'm not sure, but maybe you're looking for something like this.
This is only an example ;)PHP Code:<?php
$value = array(
'Text 1',
'Text 2',
'Text 3');
$num = rand(0,2);
echo $value[$num];
?>
I just simply want to put ad coding into it, each time it loads it shows a random ad.
Edit:
Thanks anyways but i found something better. :)
Last edited by Josh; 15-09-06 at 09:19 PM.
Care to post what you found Josh? Ad rotation = yummies
EDIT: By the way, you know your previous post about a login script well instead of usingyou could useCode:if ($_SESSION['logged_in'] = 1) {page contents} else {echo 'not logged in'}Code:<? if ($_SESSION['logged_in'] != 1) { echo "You are not logged in."; die(); }
Last edited by Mazo; 16-09-06 at 11:18 PM.
And instead of that you should use
Learn to code efficient people! ;)Code:<? if (!$_SESSION['logged_in']) die("You are not logged in.");
Also, care to share here what the sollution was?
Leave me alone frag :( im not that great at php...yet :(