First, PHP configuration MySQL
1, copy the PHP installation directory under the Php_mysql.dll and MySQL installation directory libmysql.dll files to C:/windows/system32;
2, Configuration PHP.ini
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dllExtension=php_mysqli.dllPut the top four. dll above the front;
Second, the implementation of the PHP
This article mainly introduces thinkphp forms for uploading files and saving the file path to the database. For more information, see upload a single file.
Create a database upload_img to save the upload path
Create table 'Seminar _ upload_img '('id' int (11) not null AUTO_INCREMENT, 'IMG _ name' varchar (255) default null comment 'image name ', 'IMG _ url' varchar (255) default null comment 'image path
Tags: When a new user registers, the website will store the user's registration information in the database, and then extract it when needed.
A simple example is written today.
The main completion of the following functions: (1) users to register, to achieve password duplication confirmation, Verification code proofing function.
(2) After successful registration, the user is inserted into the database
Php processes two buttons in a form to determine whether the database exists (I need to press submir1 to determine whether the user exists, and press sunmir2 to determine whether the password exists)
The following is the online search code, and the test does not respond. could you tell me how to change it?
If (isset ($ _ POST ['submit1']) {
// If ($ _ PO
Not much nonsense to say, directly to everyone to paste the code, the specific code is as follows:
The above code in a different format, do not know which format is better
The above is a small series to introduce you to the PHP form data written to MySQL database code, I hope to help you!
Nonsense not to say more, directly to everyone to paste the code, the specific code as follows:
The code above is in a different format and you don't know which format is better
The above is a small series to introduce PHP form data to the MySQL database code, I hope to help!
Recently in the company project, found a strange problem, submitted a normal form, unexpectedly found unable to get the value of the submitted, this discovery, let me start the time confused, initially thought that my service has a problem, not normal write database, and then detect SQL statement found, The original problem occurred in the acquisition of data, the data obtained is empty, and then a debug fo
Php prevents repeated forms and php prevents form submission. Php prevents repeated submission of forms. php prevents users from submitting forms due to the speed of the network or malicious refreshing of webpages, this causes the same record to be inserted to the
Php is an example of form password verification and HTTP verification usage. Php is an example of form-based password verification and HTTP authentication usage. This document describes the use of form-based password verification and HTTP authentication in
any form element in the HTML page can be automatically used for PHP scripts:
Form example:
The preceding HTML page contains two input boxes [input field] and a [submit] button. When you fill in the information and click the submit button, the data in the form will be sent to the "welcome.
PHP form data written to MySQL code, PHP form written to MySQL
Insert operation
Phpif(!isset($_post[' Submit '])){ //If there is no form submission, a form is displayed?>
PHP
Use PHP to implement a simple user registration form example and php to implement registration form example
1. display the user information table of a single row
First, we need to create two files: an html file and a PHP file.
Here, the blogger created the form.html and form
When I was working on a company project recently, found a strange problem, submit a normal form, unexpectedly found that can not get the value of the submission, this discovery, unavoidably let me start confused, at the beginning of time I think that my service is problematic, not normal to write to the database, and then detect the SQL statement found, The original problem actually appeared in the acquisit
PHP prevents users from repeating the form, and PHP prevents the form from being submitted
One of the limitations we cannot ignore when we submit a form is to prevent users from repeating the form, because it is possible for user
A php form is an area that contains form elements, and a form can be created by using the
Form elements are elements that allow users to enter information in a table consignments (such as a text field, drop-down list, radio box, check box, and so on).
The
PHP is used to obtain the values of all the check boxes of a form. php is used to obtain the check boxes of a form.
Generally, php always obtains only the value of the last check box. How can we get the value of all check boxes?
The solution is as follows:
Some code of
PHP form data writes MySQL code, php form writes mysql
Reference: http://www.cnblogs.com/roucheng/p/phpmysql.html
The above Code uses different formats. I don't know which format is better.
If (! Isset ($ _ POST ['submit ']) {
// If no form is submitted, a
Is the PHP page form processing function and form on the same page? There is a form that accepts all input data. For example, if there are two items: name and address, the PHP code is responsible for writing them into the database
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.