background preloader

Web_Site

Facebook Twitter

PHP and MySQL Web Development: Ajax Basics > What is Ajax? Ajax enhances interactivity while reducing the time spent retrieving static elements. This chapter introduces the basics of Ajax programming and provides some sample Ajax elements you can integrate into your PHP and MySQL applications. The World Wide Web began as a series of static pages containing text and links to image, audio, and video files. For the most part, the Web still exists in this state, although many of these pages filled with text and multimedia are dynamically generated through server-side scripting; this is what you have created through the applications in this book.

But the advent of Web 2.0 has led developers to attempt to find new methods of user interaction with the web servers and databases that store the information we desire. In this chapter, we introduce the basics of Ajax programming and provide some sample Ajax elements you can integrate into your applications. The combination of scripting and markup languages used to create Ajax applications. And/or. Styling the html and body Elements. One of the most common ways to begin a layout in HTML is this: <html><head>... </head><body><div id="wrapper"><div id="container"> ... </div></div></body></html> That’s the ol’ double-wrapped div layout technique. But, since we already have the html and body elements, the div elements might be redundant in a lot of situations. So in order find out if CSS styles can be applied to the html and body elements just like our hard-working wrappers, I tested a range of CSS properties in FireFox 3, Safari 3.2, Opera 9.6, and Internet Explorer 6, 7, and 8.

Here’s what I found. You can add padding to the html and body elements and it works in all browsers tested. Adding a margin to the html element works in all browsers tested except IE6, which ignores it. One quirk I found was that if you have a background image on the html element as well as a top margin, Safari and IE7 will ignore the margin and display the background starting from the top left corner of the viewport. So what does work? SitePoint Reference. Blogs » A Minimal HTML Document. I am often surprised by just how many professionally-designed sites are delivered in the form of incomplete HTML documents. To be fair, however, the amount of code required for even an empty HTML document has grown significantly over the years.

One upon a time, an HTML document only had to contain a <! DOCTYPE> declaration and a <title> tag. From the HTML 3.2 recommendation: In practice, the HTML, HEAD and BODY start and end tags can be omitted from the markup […]Every HTML 3.2 document must also include the descriptive title element. A minimal HTML 3.2 document thus looks like: <! At the time HTML 3.2 was the recommended spec, very few web designers bothered with a <! These days, the needs of accessibility, search engine optimization, document consistency for JavaScript manipulation, and support for international characters all combine to require more of our HTML. Here’s the very minimum that an HTML 4 document should contain, assuming it has CSS and JavaScript linked to it: <!

<! Creating a Custom RSS Feed with PHP and MySQL. RSS has become the standard technology for syndicating information to large audiences. Many people have something to say, but its finding the right audience for your voice that matters. A great place to start is by creating your own RSS feed and adding to it as often as you can. In this article you'll learn how to syndicate your own custom RSS feeds using PHP and MySQL. We'll first learn how to create two database tables and then how to retrieve data from them which will be formatted into an RSS feed. Here's an example of the completed RSS feed and a download link to the code.

Creating the MySQL RSS Tables An RSS feed consists of the main details for the feed, such as the title, description, url, image and so on. In order to get started with the database tables, use the following code, which can be found in the webref_rss_details.sql file, to create the webref_rss_details table: