Use PHP to add custom content on the MAIN. PHP page.

Source: Internet
Author: User
Use PHP to add custom content in MAIN. PHP on the homepage. if you have any code to help you with the following code, you must have a problem. I have tried it. I am just getting started. please help me! My idea is as follows: first in MAIN. enter the HTML code of all custom content in PHP. for example, you can add up to 2 custom content quickly. for example, A and B, I will first write HTMLcode & lt; on the homepage; divid = use PHP on the home page MAIN. PHP allows users to customize the added content, with code for help
The following code must be correct. I have tried it. I just got started. please help me!


My idea is as follows:
First, enter the HTML code of all custom content in MAIN. PHP. for example, you can add up to 2 custom content quickly. for example, A and B, I will first write in the home page:
HTML code
  "> A"> B, set [code = CSS] # a {display: none;} # B {display: none;} in CSS ;} # a1 {}# b1 {}

[/Code]
That is to say, you can check the required content block in the checkbox on the custom. PHP page ..

Setcookie ("events", $ _ POST ['events'], $ now + (60 ));
Setcookie ("friends", $ _ POST ['DS DS'], $ now + (60 ));
PHP code
     if(isset($_COOKIE['events'])) {      $widgets1 = $_COOKIE['events'];   } else {      $widgets1 = "eventsshow";         }      if(isset($_COOKIE['friends'])) {      $widgets2 = $_COOKIE['friends'];   } else {      $widgets2 = "friendsshow";         }   
        
   Widgets      
   >      
   events      
   
> friends ?>




------ Solution --------------------
Since it is to control fast display or not
The block id should be set dynamically. The value is always one of a, B, a1, and b1.
I really don't know where you did this operation.
------ Solution --------------------
Radio is a group with the same name, and checkbox is each with a separate name
Why didn't you use name?

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.