I have the following code:
Code: <?php
$display_block .= "<input type=button value="Generate Random Monster">";
$get_monsters = "select * from monsters1";
$get_monsters_res = mysql_query($get_monsters, $conn) or die(mysql_error());
$display_block .= "<table class=monster>";
while ($monsters_info = mysql_fetch_array($get_monsters_res)) {
$monster_id = $monsters_info['id'];
$monster_name = $monsters_info['name'];
$monster_map = $monsters_info['map'];
$monster_location = $monsters_info['location'];
$monster_hit_points = $monsters_info['hit_points'];
$monster_attack = $monsters_info['attack'];
$monster_defense = $monsters_info['defense'];
$monster_agility = $monsters_info['agility'];
$monster_wisdom = $monsters_info['wisdom'];
$monster_magic_endurance = $monsters_info['magic_endurance'];
$monster_number_of_attacks = $monsters_info['number_of_attacks'];
$monster_range = $monsters_info['range'];
$monster_experience_points = $monsters_info['experience_points'];
$monster_silver = $monsters_info['silver'];
$display_block .= "<tr><td>$monster_name</td>";
}
?>
And what I want to do is when they click the button (Generate Random Monster), that it displays a random record from the table. All I want the user to see is the "monster_name". Can anyone tell me how to make the button show a random record from the table in my database? I also would like the table information to be invisible to the user until they click the button. How can I do that?
ORA-01017: invalid username/password; logon denied
Dear All,
URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But now that i am buying in traffic through Adwords the gclid parameter is being dropped and im unable
FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then suddenly I started getting the "FPDF error: Some data has already been output, can't send PDF
Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spamming, and not just regular spamming. They edited all the current user posts to their name, and
Problems generating word documents on server side for security reasons
I have a problem with word documentation generation when generating a word document (docx) with PHP. I am doing this for security reasons, as I do not want people to be able to directly access a file
Passing vars to the DB
I have 3 small testing tables:ID TYPE1 pepperoni2 C. bacon3 tacoID TYPE1 small2 med3 largeID TYPE1 bud2 hef3 mil best4 7up5 orange6 cokeEach one is a select menu. How would I pass these as
How do I know when getBounds Method is ready to be called.
I have an application that changes out stylesheets client side. Once I change stylesheet the browser changes immediately but there is a lag until the Sys.UI.DomElement.getBounds method will return
Why do I get this error
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a5488351/public_html/bbdemo.php on line 90Code:<?php session_start(); ?><?php require
Local file browser with php
Halo..So this is what i want to create. I have a folder that i share and it has many movies..So i will setup a local web browser and i want to make a .php file that after you login it will saw you the
array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in...." error on the following site: http://nwsurfing.com/buoy.phpi