sorry I am new to PHP. I would like my code to randomly select from these: '/post371/', '/post375/', '/post377/', but when I tried to access my url it redirects...



sorry I am new to PHP. I would like my code to randomly select from these: '/post371/', '/post375/', '/post377/',


but when I tried to access my url it redirects to https://example.com0 , https://example.com1, https://example.com2.


Instead of, https://example.com/post371/ , https://example.com/post375/ , https://example.com/post377/


Here's my code:


$pagez = array(
'/post371/',
'/post375/',
'/post377/',
);


if(empty($_GET['redir'])) {
$_GET['redir'] = base64_encode(home_url() . array_rand($pagez));
}
?>












window.onload = function() {
document.getElementById('landing').submit();
}


Thank You!









Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here