I wanted to make my site use more PHP in order to save space on HTML code and I wanted to try using this code to make a menu that would launch different div
s containing different pages or information per se, I was wondering if search bots would have difficulty navigating such a maze because of php or Javascript or both?
Here's the code,
<?php
if($_GET['button1']){fun1();}
if($_GET['button2']){fun2();}
function fun1()
{
//creates a div with a link to google
echo'<a href = "http://www.google.com"><div style = "height:100px; width:20px; top:100px; left:100px; background-color: black;"></div></a>';
}
function fun2()
{
//creates a div with a link to yahoo
echo'<a href = "http://www.yahoo.com"><div style = "height:200px; width:40px; top:200px; left:200px; background-color: red;"></div></a>';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
</head>
<body>
<button id="btnfun1" name="btnfun1" onClick='location.href="?button1=1"'>Update to 1</button>
<button id="btnfun2" name="btnfun2" onClick='location.href="?button2=1"'>Update to 2</button>
</body>
</html>