Saturday, October 30, 2010

How To Protect Special Characters in Query String?

If you want to include special characters like spaces in the query string,
you need to

protect them by applying the urlencode() translation function. The script
below shows

how to use urlencode():


print(“< html >”);
print(“< p >
Please click the links below”
.” to submit comments about FYICenter.com:< /p >
”);
$comment = ‘I want to say: “It\’s a good site! :->”‘;
$comment = urlencode($comment);
print(“< p >

.”
.”It’s an excellent site!
< /p >
”);
$comment = ‘This visitor said: “It\’s an average site! :-(“‘;
$comment = urlencode($comment);
print(“< p >

.’
.”It’s an average site.

”);
print(“< /html >”);

Advantages and disadvantages of CASCADE STYLE SHEETS?

External Style Sheets
Advantages
Can control styles for multiple documents at once Classes can be created
for use on

multiple HTML element types in many documents Selector and grouping
methods can be

used to apply styles under complex contexts

Disadvantages
An extra download is required to import style information for each
document The

rendering of the document may be delayed until the external style sheet is
loaded

Becomes slightly unwieldy for small quantities of style definitions

Embedded Style Sheets
Advantages
Classes can be created for use on multiple tag types in the document
Selector and

grouping methods can be used to apply styles under complex contexts No
additional

downloads necessary to receive style information

Disadvantage
This method can not control styles for multiple documents at once

Inline Styles
Advantages
Useful for small quantities of style definitions Can override other style

specification methods at the local level so only exceptions need to be
listed in

conjunction with other style methods

Disadvantages
Does not distance style information from content (a main goal of
SGML/HTML) Can not

control styles for multiple documents at once Author can not create or
control classes

of elements to control multiple element types within the document Selector
grouping

methods can not be used to create complex element addressing scenarios

I just got my #domain @BigRock. Get upto 25% off with my personalized coupon link Get upto 25% off