echo-out input cannot invoke the OnClick event to seek the master

Source: Internet
Author: User
Tags smarty template

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 " "; } echo " "; $num = 1; while ($row =mysql_fetch_row ($res)) {echo " "; echo " "; for ($i =0; $i < $fields; $i + +) {echo " "; } echo " "; $num + +; } echo "
$fieldname
$row [$i]
";
?>

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.
    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.