PHP HTML JavaScript MySQL code How to share the value of the method sharing _php tutorial

Source: Internet
Author: User
Tags mysql code
1.PHP

a.php HTML & JavaScript

The amount is super simple, I also want to write = =~

In the HTML code

/>
in JavaScript code
Copy CodeThe code is as follows:


b.php <-> MySQL

In PHP code
Copy CodeThe code is as follows:
$DBCNX = @mysql_connect ("localhost", "root", "1234");
if (! $dbcnx) {
Echo ("Unable to connect to the".) Database server at the this time. ");
Exit ();
}

if (! @mysql_select_db ("PMS")) {
Echo ("Unable to locate the joke".) Database at this time. ");
Exit ();
}
mysql_query ("SET NAMES ' GB2312 '");


$q =mysql_query ("SELECT * from ability where ALV = 1");
while ($row =mysql_fetch_array ($q)) {
$array 1[] = $row [AName];
}
?>

2.HTML

A. HTML--PHP (post mode)

In the HTML code
Copy CodeThe code is as follows:


In the do.php file code
Copy CodeThe code is as follows:
echo $_post[' count '];
?>

B. JavaScript, HTML


JavaScript code (available, can be changed)
Copy CodeThe code is as follows:


3.JavaScript

A. HTML (generic method, not validated), JavaScript

in JavaScript code
Copy CodeThe code is as follows:



HTML code
Copy CodeThe code is as follows:


B. JavaScript-PHP

Transfer via HTML

1.JavaScript Code First to HTML
Copy CodeThe code is as follows:


2.html Code to PHP
Copy CodeThe code is as follows:


3.do.php received
Copy CodeThe code is as follows:
echo $_post[' count '];
?>

http://www.bkjia.com/PHPjc/326107.html www.bkjia.com true http://www.bkjia.com/PHPjc/326107.html techarticle 1.PHP a.php-html lt;input type= "" readonly= "readonly" style= ' Background-color: #DCDCDC ' value=?php echo $perinfo [ID ];? /JavaScript code copy the code as follows: script type ...

  • 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.