Iamback-e-commerce website development & amp; jQuery, back-e-commerce _ PHP Tutorial

Source: Internet
Author: User
Iamback-e-commerce website development & amp; jQuery, back-e-commerce. Iamback-jQuery and back-e-commerce hi developed by e-commerce websites have not been updated for nearly two weeks, but lazy is a waste of other things. Now, I am going home, even though I am back-e-commerce website development & jQuery, back-e-commerce

Hi

There have been no updates for nearly two weeks before, except lazy. Now it's good to go home. although the water stops at home and there is snow outside, it's freezing, but it's a lot of inconvenience, it's a little idle.

Develop e-commerce websites, the only way to learn PHP.

1. e-commerce website development-front-end

I. homepage creation

1.1 Overview & preparation

What does an e-commerce website include? the Homepage information, the following category information page, the product details page, the shopping page, and the after-sales page. When you do it yourself, you can simply draw an overview chart to guide development, so as not to confuse logic.

Preparation: The project folder contains three subfolders: images, javascript, and style. Tool, look at personal interests, but it involves the front-end, generally used to use more DS, I am relatively lazy, directly use zend + browser to calculate.

In the examples, there is a real-time reset.css, that is, clearing/clearing the css effect. Css I am basically an idiot. find a source code and paste it:

@ Charset "UTF-8 ";
/* CSS Document */
Body, ul, ol, li, p, h1, h2, h3, h4, h5, h6, form, fieldset, table, td, img, p, dl, dt, dd, input {margin: 0; padding: 0 ;}
Body {font-size: 12px ;}
Img {border: none ;}
Li {list-style: none ;}
Input, select, textarea {outline: none; border: none; background: none ;}
Textarea {resize: none ;}
A {text-decoration: none; color: #656565 ;}

/* Clear floating */
. Clearfix: after {content: ""; display: block; clear: both ;}
. Clearfix {zoom: 1 ;}
. Fl {float: left ;}
. Fr {float: right ;}

1.2 Top structure

I don't know how to use fireworks.

-------- It really hurts. make a start and find yourself naive. complete the advanced web jQuery first ----------

2. jQuery

12. jQuery online chat room

12.1 basic functions

After logging in, you can enter (online display of basic information );

Dynamically display Post-communication content;

Communication between words and expressions (expressions are also character code codes)

Technical focus:AjaxThe new technology of refreshing data

12.2 effect

Use ajax functions in jq (for example, $. ajax) to log on. when logging on to jq, it is displayed as correct or failed, with corresponding actions;

The chat room is the chat content area. enter the area and the personnel display area.

12.3 process

Logon page --> request login information (username and password) from the server --> success: go to the chat homepage; otherwise, go back to the logon page.

Chat page -- request chat data -- get chat data;

Online personnel information -- request -- obtain;

Therefore, we can make a simple plot. here I pass through, and then clearly see the number of pages to be done, the logic and correspondence between requests and responses.

12.4 develop login on the logon page

-- Function

Verify logon information;

Enter the chat room;

-- Code

One of the methods mentioned in PDO previously, using the POST method to directly pass table parameters:





Login




Then the subsequent work will be implemented in login. php;

Header ('content-type: text/html; charset = utf-8 ');
$ Username = $ _ POST ['username'];
$ Password = $ _ POST ['password'];
Try {
$ Pdo = new PDO ('MySQL: host = localhost; dbname = imooc ', 'root ','');
$ Pdo-> exec ('use imooc_pdo ');
$ SQL = "select * from user where username =? And password =? ";
$ Stmt = $ pdo-> prepare ($ SQL );
$ Stmt-> execute (array ($ username, $ password ));
// $ Stmt = $ pdo-> query ($ SQL );

$ Shit = $ stmt-> rowCount (); // display the number of rows in the result set statement object
Echo $ shit;
If ($ shit = 1 ){
// $ Url = "ChatMain.html ";
Echo"

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.