php html_begin

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
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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NerdsOfTechTechnology ScientistCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.