I’ve been having some trouble with another example in my programming class, and I know how to do it…but I don’t know how to [i]execute
What we have to do is generate a random character (A-Z) and make it a hyperlink going to another page saying which letter was clicked. What I can’t figure out (though I have a theory) is how to pass the variable that is the random character to the next page. I was thinking of trying to pass it through the URL, but that is [i]way
Here’s my first page’s code, if it is needed:
[code=php]<?xml version=”1.0″ encoding=”utf-8″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>
2910_25.php
</title>
</head>
<body>
<!–Code excluded(name)–>
<?php
$y=1;
while ($y <= 50)
{
$x=chr(rand(65,90));
echo “<a href=’http://ito.auburncc.org/localuser/snelson/month_2_of_10/2910_25_get.php’>”.$x.”</a>”;
$y++;
}
?>
</body>
</html>
Any help would be greatly appreciated.