php html_begin

Posted on 2009-05-25
Medium Priority
Last Modified: 2013-12-12
error with html_begin

in apache how 'install' dump_members.php script in ushl directory
To encode values for display in the Web page, dump_members.php uses the
htmlspecialchars() function to take care of escaping characters that are special in
HTML, such as <,>, or &. (To encode values for inclusion with URLs, use
urlencode() instead.) These two PHP encoding functions are similar to the CGI.pm
escapeHTML() and escape() methods for Perl that are discussed in Section,
Escaping HTML and URL Text.
To try the dump_members.php script, install it in the ushl directory of your Web server
document tree and access it from your Web browser using this URL:
To let people know about dump_members.php, place a link to it in the Historical
League home page script.The modified script (index4.php) looks like this:
# USHL home page - version 4
require_once "sampdb_pdo.php";
$title = "U.S. Historical League";
html_begin ($title, $title);
<p>Welcome to the U.S. Historical League Web Site.</p>
$dbh = sampdb_connect ();
$sth = $dbh->query ("SELECT COUNT(*) FROM member");
$count = $sth->fetchColumn (0);
print ("<p>The League currently has $count members.</p>");
$dbh = NULL; # close connection
catch (PDOException $e) { } # empty handler (catch but ignore errors)
You can view the directory of members <a href="dump_members.php">here</a>.
542 Chapter 9 Writing MySQL Programs Using PHP
html_end ();

Open in new window

Question by:shopjd
1 Comment
LVL 21

Accepted Solution

NerdsOfTech earned 2000 total points
ID: 24469033
1. What error are you receiving?
2. Is the function html_begin() defined in your included file "sampdb_pdo.php"; If not that is what is probably causing the error

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question