Require_once ' SqlHelper.class.php ';
$SqlHelper =new SqlHelper ();
$sql = "SELECT * from User1";
$res = $SqlHelper->execute_dql ($sql);
$fields =mysql_num_fields ($res);
$rows =mysql_num_rows ($res);
echo "
"; echo "
| "; for ($i =0; $i < $fields; $i + +) {$fieldname =mysql_field_name ($res, $i); echo "
$fieldname | "; } echo "
"; $num = 1; while ($row =mysql_fetch_row ($res)) {echo "
"; echo "
| "; for ($i =0; $i < $fields; $i + +) {echo "
$row [$i] | "; } echo "
"; $num + +; } echo "
";
?>
Why Onclick=checkall (this.form) Call JS no use it
Reply to discussion (solution)
The goal is to do a bulk delete Click the Select All button to all selected but not use
Do not see the form tag
In addition Echo ""; Also does not conform to PHP conventions
Elder can help to change it, little brother at present a lot of beginners do not understand
Currently using HTML to display PHP read out of the data do not know how to handle always echo
This problem is most suitable for beginners to solve
First you need Firefox browser and Firebug plugin
Then press F12 to open the plugin refresh page
Then "control" in this column if JS error will be error, where there are problems and so on
If there is no error, then click on your button and you will find the error
For example, I'll run your file and click on the input to appear
That is, this form is undefined.
Moderator sharply
We don't have the power, and that Firebug will help us, especially, very helpful. Highly recommended
Currently using HTML to display PHP read out of the data do not know how to handle always echo
It's a real hassle, is there any good way?
It's really troublesome. Is there any good way to do that? This is the problem of not separating the program and view a little bit to study the MVC or smarty template to separate the program and view from the only place where the data in the view needs to be output, the Echo data HTML tag is written directly.