Hi, I'm trying to figure out how to create a random integer, that I can ALSO control by using links, which I'm setting as buttons.
In short, I've been programming an MP3 Player.
Currently, I have "$playing" set as a random integer, but I want links to increase by 1, -1, and random on click.
$result = mysql_query("SELECT * FROM songlist");
$tracks = mysql_num_rows($result);
$playing =rand(1,$tracks);
My play button currently just reloads the current page (<A HREF="">) to select another random track.
But obviously, I still get the same song sometimes, but that's a lower concern.
I'm just wanting to know how to have a randomly generated number on load, that can be increased and decreased by clicking images.
When I tried to link <A OnClick=> to a javascript function to increase it, it still loaded up only the $playing variable declared above, near the top.
Of course, I barely know javascript, so I may have likely been doing something wrong.
Could someone please help me out here?