Learning PHP MySQL JavaScript Early Release 6th Edition Robin Nixon - Download the ebook now for instant access to all chapters
Learning PHP MySQL JavaScript Early Release 6th Edition Robin Nixon - Download the ebook now for instant access to all chapters
com
https://textbookfull.com/product/learning-php-mysql-
javascript-early-release-6th-edition-robin-nixon/
OR CLICK HERE
DOWLOAD EBOOK
https://textbookfull.com/product/learning-php-mysql-javascript-6th-
edition-robin-nixon/
textbookfull.com
https://textbookfull.com/product/learning-php-mysql-javascript-with-
jquery-css-html5-5th-edition-robin-nixon/
textbookfull.com
https://textbookfull.com/product/learn-php-8-using-mysql-javascript-
css3-and-html5-second-edition-steve-prettyman/
textbookfull.com
PHP and MySQL for Dynamic Web Sites Fifth Edition Ullman
https://textbookfull.com/product/php-and-mysql-for-dynamic-web-sites-
fifth-edition-ullman/
textbookfull.com
Learning Node Moving to the Server Side Early Release
Shelley Powers
https://textbookfull.com/product/learning-node-moving-to-the-server-
side-early-release-shelley-powers/
textbookfull.com
https://textbookfull.com/product/html5-20-lessons-to-successful-web-
development-1st-edition-robin-nixon/
textbookfull.com
https://textbookfull.com/product/php-and-mysql-web-development-5th-
edition-developer-s-library-luke-welling/
textbookfull.com
https://textbookfull.com/product/beginning-php-and-mysql-from-novice-
to-professional-5th-edition-frank-m-kromann/
textbookfull.com
https://textbookfull.com/product/hands-on-machine-learning-with-
scikit-learn-and-tensorflow-early-release-2nd-edition-aurelien-geron/
textbookfull.com
Learning PHP, MySQL &
JavaScript
SIXTH EDITION
With Early Release ebooks, you get books in their earliest form—the
author’s raw and unedited content as they write—so you can take
advantage of these technologies long before the official release of these
titles.
Robin Nixon
Learning PHP, MySQL & JavaScript
by Robin Nixon
Copyright © 2021 Robin Nixon. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(http://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Copyeditor: TK
Proofreader: TK
Indexer: TK
Audience
This book is for people who wish to learn how to create effective and
dynamic websites. This may include webmasters or graphic designers who
are already creating static websites but wish to take their skills to the next
level, as well as high school and college students, recent graduates, and
self-taught individuals.
In fact, anyone ready to learn the fundamentals behind responsive web
design will obtain a thorough grounding in the core technologies of PHP,
MySQL, JavaScript, CSS, and HTML5, and you’ll learn the basics of the
React library and React Native Framework, too.
Assumptions This Book Makes
This book assumes that you have a basic understanding of HTML and can
at least put together a simple, static website, but does not assume that you
have any prior knowledge of PHP, MySQL, JavaScript, CSS, or HTML5—
although if you do, your progress through the book will be even quicker.
Supporting Books
Once you have learned to develop using PHP, MySQL, JavaScript, CSS,
and HTML5, you will be ready to take your skills to the next level using the
following O’Reilly reference books:
Constant width
NOTE
This element signifies a tip, suggestion, or general note.
WARNING
This element indicates a warning or caution.
NOTE
For more than 40 years, O’Reilly Media has provided technology and business training,
knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and
expertise through books, articles, and our online learning platform.
O’Reilly’s online learning platform gives you on-demand access to live
training courses, in-depth learning paths, interactive coding environments,
and a vast collection of text and video from O’Reilly and 200+ other
publishers. For more information, visit http://oreilly.com.
How to Contact Us
Please address comments and questions concerning this book to the
publisher:
Sebastopol, CA 95472
We have a web page for this book, where we list errata, examples, and any
additional information. You can access this page at [[[ERRATA URL GOES
HERE]]].
To comment or ask technical questions about this book, send email to
bookquestions@oreilly.com.
For news and more information about our books and courses, see our
website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Acknowledgments
I would like to thank Senior Content Acquisitions Editor, Amanda Quinn,
Content Development Editor, Melissa Potter, and everyone who worked so
hard on this book, including ???, ??? & ??? for their comprehensive
technical reviews, ??? for overseeing production, ??? for copy editing, ???
for proofreading, ??? for creating the index, Karen Montgomery for the
original sugar glider front cover design, ??? for the latest book cover, my
original editor, Andy Oram, for overseeing the first five editions, and
everyone else too numerous to name who submitted errata and offered
suggestions for this new edition.
Chapter 1. Introduction to
Dynamic Web Content
The World Wide Web is a constantly evolving network that has already
traveled far beyond its conception in the early 1990s, when it was created to
solve a specific problem. State-of-the-art experiments at CERN (the
European Laboratory for Particle Physics, now best known as the operator
of the Large Hadron Collider) were producing incredible amounts of data—
so much that the data was proving unwieldy to distribute to the participating
scientists, who were spread out across the world.
At this time, the internet was already in place, connecting several hundred
thousand computers, so Tim Berners-Lee (a CERN fellow) devised a
method of navigating between them using a hyperlinking framework, which
came to be known as Hypertext Transfer Protocol, or HTTP. He also created
a markup language called Hypertext Markup Language, or HTML. To bring
these together, he wrote the first web browser and web server.
Today we take these tools for granted, but back then, the concept was
revolutionary. The most connectivity so far experienced by at-home modem
users was dialing up and connecting to a bulletin board that was hosted by a
single computer, where you could communicate and swap data only with
other users of that service. Consequently, you needed to be a member of
many bulletin board systems in order to effectively communicate
electronically with your colleagues and friends.
But Berners-Lee changed all that in one fell swoop, and by the mid-1990s,
there were three major graphical web browsers competing for the attention
of 5 million users. It soon became obvious, though, that something was
missing. Yes, pages of text and graphics with hyperlinks to take you to other
pages was a brilliant concept, but the results didn’t reflect the instantaneous
potential of computers and the internet to meet the particular needs of each
user with dynamically changing content. Using the web was a very dry and
plain experience, even if we did now have scrolling text and animated
GIFs!
Shopping carts, search engines, and social networks have clearly altered
how we use the web. In this chapter, we’ll take a brief look at the various
components that make up the web, and the software that helps make using it
a rich and dynamic experience.
NOTE
It is necessary to start using some acronyms more or less right away. I have tried to
clearly explain them before proceeding, but don’t worry too much about what they stand
for or what these names mean, because the details will become clear as you read on.
Although it’s helpful to be aware of this process so that you know how the
three elements work together, in practice you don’t really need to concern
yourself with these details, because they all happen automatically.
The HTML pages returned to the browser in each example may well
contain JavaScript, which will be interpreted locally by the client, and
which could initiate another request—the same way embedded objects such
as images would.
<?php
echo " Today is " . date("l") . ". ";
?>
The opening <?php tells the web server to allow the PHP program to
interpret all the following code up to the ?> tag. Outside of this construct,
everything is sent to the client as direct HTML. So, the text Here's the
latest news. is simply output to the browser; within the PHP tags, the
built-in date function displays the current day of the week according to
the server’s system time.
The final output of the two parts looks like this:
PHP is a flexible language, and some people prefer to place the PHP
construct directly next to PHP code, like this:
There are even more ways of formatting and outputting information, which
I’ll explain in the chapters on PHP. The point is that with PHP, web
developers have a scripting language that, although not as fast as compiling
your code in C or a similar language, is incredibly speedy and also
integrates seamlessly with HTML markup.
NOTE
If you intend to enter the PHP examples in this book into a program editor to work
along with me, you must remember to add <?php in front and ?> after them to ensure
that the PHP interpreter processes them. To facilitate this, you may wish to prepare a file
called example.php with those tags in place.
Using PHP, you have unlimited control over your web server. Whether you
need to modify HTML on the fly, process a credit card, add user details to a
database, or fetch information from a third-party website, you can do it all
from within the same PHP files in which the HTML itself resides.
Using MySQL
Of course, there’s not a lot of point to being able to change HTML output
dynamically unless you also have a means to track the information users
provide to your website as they use it. In the early days of the web, many
sites used “flat” text files to store data such as usernames and passwords.
But this approach could cause problems if the file wasn’t correctly locked
against corruption from multiple simultaneous accesses. Also, a flat file can
get only so big before it becomes unwieldy to manage—not to mention the
difficulty of trying to merge files and perform complex searches in any kind
of reasonable time.
That’s where relational databases with structured querying become
essential. And MySQL, being free to use and installed on vast numbers of
internet web servers, rises superbly to the occasion. It is a robust and
exceptionally fast database management system that uses English-like
commands.
The highest level of MySQL structure is a database, within which you can
have one or more tables that contain your data. For example, let’s suppose
you are working on a table called users, within which you have created
columns for surname, firstname, and email, and you now wish to
add another user. One command that you might use to do this is as follows:
INSERT INTO users VALUES('Smith', 'John', 'jsmith@mysite.com');
You will previously have issued other commands to create the database and
table and to set up all the correct fields, but the SQL INSERT command
here shows how simple it can be to add new data to a database. SQL is a
language designed in the early 1970s that is reminiscent of one of the oldest
programming languages, COBOL. It is well suited, however, to database
queries, which is why it is still in use after all this time.
It’s equally easy to look up data. Let’s assume that you have an email
address for a user and need to look up that person’s name. To do this, you
could issue a MySQL query such as the following:
MySQL will then return Smith, John and any other pairs of names that
may be associated with that email address in the database.
As you’d expect, there’s quite a bit more that you can do with MySQL than
just simple INSERT and SELECT commands. For example, you can
combine related data sets to bring related pieces of information together,
ask for results in a variety of orders, make partial matches when you know
only part of the string that you are searching for, return only the nth result,
and a lot more.
Using PHP, you can make all these calls directly to MySQL without having
to directly access the MySQL command-line interface yourself. This means
you can save the results in arrays for processing and perform multiple
lookups, each dependent on the results returned from earlier ones, to drill
down to the item of data you need.
For even more power, as you’ll see later, there are additional functions built
right into MySQL that you can call up to efficiently run common operations
within MySQL, rather than creating them out of multiple PHP calls to
MySQL.
Using JavaScript
The oldest of the three core technologies discussed in this book, JavaScript,
was created to enable scripting access to all the elements of an HTML
document. In other words, it provides a means for dynamic user interaction
such as checking email address validity in input forms and displaying
prompts such as “Did you really mean that?” (although it cannot be relied
upon for security, which should always be performed on the web server).
Combined with CSS (see the following section), JavaScript is the power
behind dynamic web pages that change in front of your eyes rather than
when a new page is returned by the server.
However, JavaScript can also be tricky to use, due to some major
differences in the ways different browser designers have chosen to
implement it. This mainly came about when some manufacturers tried to
put additional functionality into their browsers at the expense of
compatibility with their rivals.
Thankfully, the developers have mostly now come to their senses and have
realized the need for full compatibility with one another, so it is less
necessary these days to have to optimize your code for different browsers.
However, there remain millions of users using legacy browsers, and this
will likely be the case for a good many years to come. Luckily, there are
solutions for the incompatibility problems, and later in this book we’ll look
at libraries and techniques that enable you to safely ignore these differences.
For now, let’s take a look at how to use basic JavaScript, accepted by all
browsers:
<script type="text/javascript">
document.write("Today is " + Date() );
</script>
This code snippet tells the web browser to interpret everything within the
<script> tags as JavaScript, which the browser does by writing the text
Today is to the current document, along with the date, using the
JavaScript function Date. The result will look something like this:
NOTE
Unless you need to specify an exact version of JavaScript, you can normally omit the
type="text/javascript" and just use <script> to start the interpretation of
the JavaScript.
Using CSS
CSS is the crucial companion to HTML, ensuring that the HTML text and
embedded images are laid out consistently and in a manner appropriate for
the user’s screen. With the emergence of the CSS3 standard in recent years,
CSS now offers a level of dynamic interactivity previously supported only
by JavaScript. For example, not only can you style any HTML element to
change its dimensions, colors, borders, spacing, and so on, but now you can
also add animated transitions and transformations to your web pages, using
only a few lines of CSS.
Using CSS can be as simple as inserting a few rules between <style> and
</style> tags in the head of a web page, like this:
<style>
p {
text-align:justify;
font-family:Helvetica;
}
</style>
These rules change the default text alignment of the <p> tag so that
paragraphs contained in it are fully justified and use the Helvetica font.
As you’ll learn in Chapter 19 , there are many different ways you can lay
out CSS rules, and you can also include them directly within tags or save a
set of rules to an external file to be loaded in separately. This flexibility not
only lets you style your HTML precisely, but can also (for example)
provide built-in hover functionality to animate objects as the mouse passes
over them. You will also learn how to access all of an element’s CSS
properties from JavaScript as well as HTML.
NOTE
One of the little things I like about the HTML5 specification is that XHTML syntax is
no longer required for self-closing elements. In the past, you could display a line break
using the <br> element. Then, to ensure future compatibility with XHTML (the
planned replacement for HTML that never happened), this was changed to <br />, in
which a closing / character was added (since all elements were expected to include a
closing tag featuring this character). But now things have gone full circle, and you can
use either version of these types of elements. So, for the sake of brevity and fewer
keystrokes, in this book I have reverted to the former style of <br>, <hr>, and so on.
E
qually surprised and mystified at the complete manner in
which the tables had been turned upon him, Bracy stood
listening with a disgusted expression of countenance to the
peals of laughter which his discomfiture elicited from his
companions.
“Yes, laugh away,” growled the victimised practical joker; “it’s all
very funny, I dare say, but one thing I’ll swear in any court of justice,
which is, that you have been talking real Persian, at least if what
Frere jabbers is real Persian.”
“Of course I have,” returned Leicester, still in convulsions. “When
Frere and I planned this dodge we knew what a wide-awake
gentleman we had to deal with, and took our measures accordingly.
I learned four Persian sentences by heart from his dictation, and
pretty good use I have made of them too, I think.”
“It was not a bad idea, really,” observed Bracy, who, having got
over his annoyance at the first sense of defeat, instantly recovered
his good-humour. “How well you are got up! I did not recognise you
one bit till you pulled off the barnacles.”
“Yes, I got little Stevens, who does the light comic business at one
of the minors, to provide the apparel and come and dress me. I
hope you admire my complexion; he laid on the red and yellow most
unsparingly.”
“He has done it vastly well,” returned Bracy. “I shall cultivate that
small man; he may be extremely useful to me on an occasion.”
“Now we ought to be going upstairs,” interrupted Frere; “these
waiter fellows are beginning to stare at us suspiciously too. I say,
Bracy, cut it short, man; we have had all the fun now, and I’m
getting tired of the thing.”
“Ya, Meinheer,” rejoined Bracy aloud, adding in a lower tone, “The
slaveys will swallow that or anything else for Persian. They are all
more or less drunk, by the fishy expression of their optics.”
Laura Peyton was astonished somewhat later in the evening by
the Addiscombe professor leaning over the back of the sofa on which
she was seated and asking whether she had enjoyed her last valse
at Almack’s the evening before last.
“Surely you can feel no particular interest about such a frivolous
and unintellectual matter, sir,” was the reply.
“I was about to follow up the inquiry by asking whether your
partner made himself agreeable.”
“To which I shall reply, after the Irish fashion, by asking how it can
possibly concern you to know, sir?”
“Merely because I have the honour of the gentleman’s
acquaintance.”
“That, in fact, you are one of those uncommon characters who
know themselves,” returned Laura with an arch smile. “Is not that
what you wish to impress upon me, Mr. Leicester?”
Charley laughed, then continued in a lower tone, “I saw you knew
me. Did your own acuteness lead to the discovery, or are there
traitors among us?”
“Your friend Mr. Arundel’s expressive features let me into the
secret of his acquaintance with the English language before we went
down to supper; but I entered into a contract, not to betray the plot
if he would tell me all I might wish to know about it, so the moment
he came up I made him inform me who you were. What a
gentlemanly, agreeable person he is!”
As she said this a slight shade passed across Leicester’s good-
natured countenance, and he replied, more quickly than was his
wont—
“I had fancied Miss Peyton superior to the common feminine
weakness of being caught by the last handsome face.”
“What a thoroughly man-like speech!” returned the young lady.
“Did I say anything about his appearance, sir? Do you suppose we
poor women are so utterly silly that we can appreciate nothing but a
handsome face? Your professor’s disguise has imbued you with the
Turkish belief that women have no souls.”
“No one fortunate enough to be acquainted with Miss Peyton
would continue long in such a heresy,” replied Leicester, with the air
of a man who thinks he is saying a good thing.
“Yes, I knew you would make some such reply,” returned Laura.
“You first show your real opinion of women by libelling the whole
sex, and then try to get out of the scrape by insulting my
understanding with a personal compliment. Wait,” she continued,
seeing he was about to defend himself, “you must not talk to me any
more now, or you will excite Lady Lombard’s suspicions and betray
the whole conspiracy. Go away, and send my new friend Mr. Arundel
Hassan Bey here; Lady Lombard committed him to my charge, and I
want to cultivate him.”
Leicester tried to assume a languishing look, which he was in the
habit of practising upon young ladies with great success, but
becoming suddenly conscious of the wig and spectacles, and
gathering from Laura’s silvery laugh that such adjuncts to an
interesting expression of countenance were incongruous, not to say
absurd, he joined in her merriment, then added, “You are in a very
wicked mood to-night, Miss Peyton; but I suppose I must e’en do as
you bid me, and reserve my revenge till some more fitting
opportunity;” then, mixing with the crowd, he sought out Lewis and
delivered the young lady’s message to him, adding in his usual
drawling tone, “You have made a what-do-ye-call-it—an impression
in that quarter. Women always run after the last new face.”
“You are right,” returned Lewis, with a degree of energy which
startled his listless companion; “and those men are wisest who know
them for the toys they are, and avoid them.”
Leicester gazed after his retreating figure in astonishment, then
murmured to himself, “What’s in the wind now, I wonder; is the
good youth trying to keep up the Asiatic character, or suddenly
turned woman-hater? Confound that little Peyton girl, how sharp she
was to-night!”
“How very well Mr. Leicester is disguised!” observed Laura Peyton
to Lewis, after they had conversed in German for some minutes on
general topics.
“Yes,” replied Lewis; “though I can’t say his appearance is
improved by the alteration.”
“A fact of which he is fully aware,” returned Laura, smiling.
A pause ensued, which was terminated by Laura’s asking abruptly,
“Do gentlemen like Mr. Leicester?”
“Really I have not sufficient knowledge of facts to inform you, but
I should say he is a very popular man.”
“Popular man! I hate that phrase,” returned his companion
pettishly. “It is almost as bad as describing any one as a man about
town, which always gives me the idea of a creature that wears a
pea-jacket, lives at a club, boards on cigars, talks slang, carries a
betting-book, and never has its hair cut. Can’t you tell me what you
think of Mr. Leicester yourself?”
“Well, I think him gentlemanly, good-natured, agreeable up to a
certain point, cleverish—-”
^ “Yes, that will do; I quite understand. I don’t think you do him
justice—he has a kind heart, and more good sense than you are
disposed to give him credit for. You should not form such hasty
judgments of people; a want of charity I perceive is one of your
faults. And now I must wish you good-night; I hear my kind old
chaperone anxiously bleating after me in the distance.”
So saying she arose and hastened to put herself under the
protection of “a fine old English gentlewoman,” who, with a hooked
nose, red gown, and green scarf, looked like some new and fearful
variety of the genus Parroquet. At the same time, Bracy summoned
Lewis to join the Prince, who was about to depart, which, after Lady
Lombard had in an enthusiasm of gratitude uttered a whole
sentence in the largest capitals, he was allowed to do.
Leicester accompanied them, tearing himself away from Professor
Malchapeau, who had singled him out as a brother savan, and
commenced raconte-ing to him his affecting history, thereby leaving
that shaggy little child of misfortune to lament to his sympathising
hostess the melancholy fact that “Zie Professor Addiscombe had cut
his little tale off short, and transported himselfs avay in von great
despatch.”
’Twere long to tell the jokes that were made, the new and
additional matter brought to light, as each of the quartette,
assembled round a second edition of supper in Bracy’s rooms,
detailed in turn his own personal experiences of the evening’s
comicalities—the cigars that were smoked, or the amount of sherry
cobbler that was imbibed: suffice it to say, that a certain lyrical
declaration that they would not “go home till morning,” to which,
during their symposium, they had committed themselves, was
verified when, on issuing out into the street, the cold grey light of
early dawn threw its pale hue over their tired faces and struggled
with sickly-looking gas lamps for the honour of illuminating the
thoroughfares of the sleeping city.
Leicester’s cab, with his night-horse—a useful animal, which,
without a leg to stand upon, possessed the speed of the wind, and
having every defect horseflesh is heir to, enjoyed a constitution
which throve on exposure and want of sleep, as other organisations
usually do on the exact opposites—was in waiting. Into this vehicle
Charley (who bore some token of sherry cobbler in the unsteadiness
of his gait), having made two bad shots at the step, rushed
headlong and drove off at an insane pace, and in a succession of
zigzags.
Frere and Lewis watched the cab till, having slightly assaulted an
unoffending lamp-post, it flew round a corner and disappeared;
then, having exchanged a significant glance suggestive of
sympathetic anticipations of a sombre character in regard to the
safety of their friend, they started at a brisk pace, which soon
brought them to Frere’s respectable dwelling. While the proprietor
was searching in every pocket but the right one for that terror of all
feeble-minded elders, that pet abomination of all fathers of families,
that latest invention of the enemy of mankind—a latch-key—they
were accosted by a lad of about fifteen, whose ragged clothes,
bronzed features, and Murillo-like appearance accorded well with his
supplication, “Per pietà Signor, denaro per un pover’ Italiano.”
Frere looked at him attentively, then exclaimed, “I tell you what,
boy, it won’t do; you’re no more an Italian than I am. You should not
try to impose upon people.”
The boy hung down his head, and then replied doggedly, “It’s your
own fault; you’ll let an English boy starve in the streets before you’ll
give him a bit of bread, but you are charitable enough to them
foreign blackguards.”
“That’s not true,” replied Frere. “However, liar or not, you must be
fed, I suppose; so if you choose to take a soup-ticket, here’s one for
you.”
“No,” returned the boy proudly, “you have called me liar, and I
won’t accept your miserable bounty. I’d sooner starve first.”
“As you please,” returned Frere, coolly pocketing the rejected
ticket. “Now have the goodness to take yourself off. Come, Lewis.”
“I’ll join you immediately,” replied Lewis.
“Mind you shut the door after you, then,” continued Frere, “or we
shall have that nice lad walking off with the silver spoons.” So
saying, he entered the house.
Lewis waited till his retreating footsteps were no longer audible,
then fixing his piercing glance upon the boy, he said in an impressive
voice, “Answer me truly, and I will give you assistance. Where did
you learn to speak Italian with so good an accent?”
“In Naples, sir!”
“How did you get there?”
“I served on board a man-of-war.”
“And how have you fallen into this state of beggary?”
The boy hesitated for a moment, but something led him
instinctively to feel that his confidence would not be abused, and he
answered: “When we got back to England and the crew were paid
off I received £15. I got into bad company; they tempted me to
everything that was wrong. My money was soon gone; I had no
friends in London, and I wouldn’t have applied to them after going
on so bad if I’d had any. I sold my clothes to buy bread; and when I
had nothing left I begged, and lately I’ve passed myself off as an
Italian boy, because I found people more willing to give to me.”
“And do you like your present life?”
“No, I have to bear cold and hunger; and when people speak to
me as he did just now it makes me feel wicked. Some day it will
drive me mad, and I shall go and murder somebody.”
“What do you wish to do, then?”
“If I could buy some decent clothes, I’d walk down to Portsmouth
and try and get afloat again.”
“And what would it cost to provide them?”
“I could rig myself out for a pound.”
Lewis paused for a moment, then added quickly: “Boy, I am poor
and proud, as you are, therefore I can feel for you. Had I been
exposed to temptation, friendless and untaught, I might have fallen
as you have done. You have learnt a bitter lesson and may profit by
it; it is in my power to afford you a chance of doing so.”
He drew a card from his pocket and wrote upon it a few words in
pencil, then handing it to the boy, continued: “There is the direction
to a friend of mine, the captain of a ship about to sail in a few days;
show him my card, and tell him what you have told me. There is a
sovereign to provide your dress, and five shillings to save you from
begging or stealing till you get to Portsmouth; and when next you
are tempted to sin remember its bitter fruits.”
As he spoke he gave him the money. The boy received it
mechanically, fixed his bright eyes for a moment on the face of his
benefactor, and then, utterly overcome by such unexpected
kindness, burst into a flood of tears. As Lewis turned to depart the
first rays of the rising sun fell upon the tall, graceful figure of the
young man and the tattered garments and emaciated form of the
boy.
Far different was the scene when Lewis Arundel and the creature
he was thus rescuing from infamy met again upon the RAILROAD OF
LIFE!
CHAPTER XIII.—IS CHIEFLY
HORTICULTURAL, SHOWING THE
EFFECTS PRODUCED BY TRAINING
UPON A SWEET AND DELICATE
ROSE.
R
ose Arundel sat at the open window of her little bedroom and
gazed out into the night. The scent of many flowers hung
upon the loaded air, and the calm stars looked down from
Heaven, contrasting their impassive grandeur with the unrest of this
weary world. The evening had been lovely; not a breath of wind was
stirring; the long shadows that slept upon the green sward, and
afforded a dark background on which the brilliant glow-worms shone
like diamonds on a funeral pall, were motionless; the silence,
unbroken save when some heavy beetle or other strange insect of
the night winged its drowsy way across the casement, was almost
oppressive in its depth of stillness; it was a time and place for grave
and earnest thought, a scene in which the full heart is conscious of
its own sorrow. And Rose, although she had too much good sense
and right principle to allow herself to feel miserable, was far from
happy. The key to the inner life of every true-hearted woman must
be sought in the affections. The only two people whom Rose had
loved, as she was capable of loving, were her father and brother; for
Mrs. Arundel, though all her impulses were kind and amiable, did not
possess sufficient depth of character to inspire any very strong
attachment. Between Captain Arundel and his daughter had existed
one of those rare affections which appear so nearly to satisfy the
cravings of our spiritual nature, that lest this world should become
too dear to us they are blessings we are seldom permitted long to
enjoy. Rose and her father were by nature much alike in disposition,
and in forming her character, and educating and developing her
mind, he had for some years found his chief interest, while in her
affection lay his only solace for the blighted hopes and ruined
prospects of a lifetime.
Originally highly connected, Captain Arundel had incurred the
displeasure of his family by forming in the heat of youthful passion,
and under peculiar circumstances, a marriage with the daughter of
an English resident at Marseilles by a foreign mother. Too proud to
seek to conciliate his relations, Mr. Arundel became a voluntary exile,
entered into the Austrian army, where he speedily rose to the rank
of captain and served with much distinction, till failing health
induced him to resign his commission and return to England for the
sake of educating his children. His heart was set on one object—
namely, to bestow upon his son the education of an English
gentleman, and for this purpose he had availed himself of a very
unusual talent for painting as a means by which he might increase
his slender income sufficiently to meet the expenses of sending
Lewis to Westminster and afterwards to a German university. The
constant application thus rendered inevitable fostered the seeds of
that most insidious of all ailments, a heart-disease, and while still
forming plans for the welfare of his family, an unwonted agitation
induced a paroxysm of his complaint, and ere Rose could realise the
misfortune that threatened her she was fatherless.
Although stunned at first by the unexpected shock, hers was not a
mind to give way at such a moment, and to those who judge by the
outward expression only Mrs. Arundel’s grief appeared much more
intense than that of her daughter. But Rose’s sorrow was not a mere
transitory feeling, which a few weeks more or less might serve to
dissipate; it had become part of her very nature, a thing too sacred
to be lightly brought to view, but enshrined in the sanctuary of her
pure heart it remained a cherished yet solemn recollection, which
would shed its hallowing influence over the future of her young life.
And now, as she sat with her calm, earnest eyes upturned to the
tranquil heaven above her, her thoughts wandered back to him she
had so dearly loved, and she pondered the solemn questions which
have ere now presented themselves to many a mourning spirit, and
longed to penetrate the secrets of the grave and learn things which
death alone can teach us. Then she recalled conversations she had
held with him that was gone on these very subjects, and
remembered how he had said that the things which God had not
seen fit to reveal, could neither be needful nor expedient for us to
know; that such speculations were In themselves dangerous,
inasmuch as they tended to lead us to form theories which, having
no warrant in Scripture, might be at variance with truth; and that it
was better to wait patiently in humble faith—that a time would come
when we should no longer see through a glass darkly, and the
hidden things of God should be made known unto us. Then her
thoughts, still pursuing the same train, led her to reflect how all her
father’s aspirations, crushed and disappointed in the wreck of his
own fortunes, had centred in his son, and the bitter tears which no
personal privations or misfortunes could have forced from her,
flowed down her cheeks as she reflected how these bright
anticipations seemed doomed never to be realised.
Unselfish by nature, and trained to habits of thoughtfulness by
witnessing her father’s life of daily self-sacrifice, Rose had never
been accustomed to indulge on her own account in those day-
dreams so common to the sanguine mind of youth. But the germs of
that pride and ambition which were Lewis’s besetting sins existed in
a minor degree in Rose’s disposition also, and found vent in a
visionary career of greatness she had marked out for her brother,
and for which his unusual mental powers and striking appearance
seemed eminently to qualify him. In nourishing these visions her
father had unconsciously assisted, when in moments of confidence
he had imparted to her his hopes that Lewis would distinguish
himself in whatever career of life he might select, and by his success
restore them all to that position in society which by his own
imprudence he had forfeited. What a bitter contrast did the reality
now present! Rose had received that morning a letter from her
brother detailing his interview with General Grant and its results; and
though, from a wish to spare her feelings, he had been more
guarded in his expressions than on the occasion of his conversation
with Frere the preceding day, yet he did not attempt to disguise from
her his repugnance to the arrangement, or the degradation to which
his haughty spirit led him to consider he was submitting.
“Poor Lewis!” murmured Rose, “I know so well what misery it will
be to him; the slights, the hourly petty annoyances which his proud,
sensitive nature will feel so keenly; and then, to waste his high
talents, his energy of character and strength of will on the drudgery
of teaching, when they were certain to have led him to distinction if
he had only had a fair field for their exercise—it would have broken
dearest papa’s heart, when he had hoped so differently for him. But
if he had lived this never would have been so. He often told me he
had influential friends, and though he never would apply to them on
his own account, he declared he would do so when Lewis should
become old enough to enter into life. I wonder who they were. He
never liked to talk on those subjects, and I was afraid of paining him
by inquiring. I am glad there is a Miss Grant: I hope she may prove
a nice girl and will like Lewis; but of course she will—every one must
do that. Oh! how I hope they will treat him kindly and generously—it
will all depend upon that. Poor fellow! with his impulsive disposition
and quick sense of wrong—his fiery temper too, how will he get on?
And it is for our sakes he does all this, sacrificing his freedom and
his hopes of winning himself a name. How good and noble it is of
him!”
She paused, and leaning her brow upon her little white hand, sat
buried in deep thought. At length she spoke again.
“If I could do anything to earn money and help I should be so
much happier. Poor papa got a good deal lately for his pictures; but
they were so clever. Lewis can paint beautifully, but my drawings are
so tame. I wonder whether people would buy poetry. I wish I knew
whether my verses are good enough to induce any one to purchase
them. Dearest papa praised those lines of mine which he
accidentally found one day. Of course he was a good judge, only
perhaps he liked them because they were mine.” And the tears rolled
silently down her pale cheeks as memory brought before her the
glance of bright and surprised approval, the warm yet judicious
praise, the tender criticism—words, looks, and tones of love now lost
to her for ever, which the accidental discovery of her verses had
drawn forth. With an aching heart she closed the casement, and
lighting a candle, proceeded to unlock a small writing-desk, from
whence she drew some manuscript verses, which ran as follows:—
T
hree days passed by, and still poor Rose received no answer to
her letter, but remained a prey to alternate hopes and fears
and all “The gnawing torture of an anxious mind.” On the
fourth arrived the following characteristic note:—
“My dear Miss Arundel,—I dare say you’ve been abusing me like a
pick-pocket; at least I must have appeared to you deserving of such
abuse, for treating your request so cavalierly; but the fact is, I have
been down in a Cornish tin mine for the last two days, and only
received your packet on my arrival in town, an hour ago. And now to
business. I don’t set up for a judge of poetry, though I know what
pleases me and what doesn’t (I should be a donkey if I did not,
you’ll say); for instance, the present school of ‘suggestive’ poetry
doesn’t suit me at all. But then I have an old-fashioned prejudice in
favour of understanding what I read, and calling a railway
locomotive a ‘resonant steam eagle,’ for instance, does not tend to
simplify literature; the only thing such phrases ‘suggest’ to me is that
it would be a great deal better if the authors were content to stick to
plain English, and when they have such inexpressibly grand ideas,
not to trouble themselves to express them at all. Your verses have at
least one good point in them—they are so worded that a plain man
may understand them; in fact, all that I have yet read I like—the
feeling is invariably pure, true, and beautiful (your heart’s in the
right place, and no mistake); the language is well chosen, and
sometimes eloquent; there are, of course, plenty of places where it
becomes weak and young lady-like, but that was only to be
expected. We can’t all be men, unfortunately. I could not help
laughing when you ‘supposed I knew’ all the booksellers and
publishers in London, Heaven forbid! for in that case I should have a
very miscellaneous acquaintance. However, I do know several, and I
will go the first thing to-morrow morning and consult one of them—a
gentleman on whose judgment I can rely as to what will be the most
advisable course for us to pursue. I say us, because, as I don’t mean
to let the matter rest till I have succeeded, I consider myself a
partner in the concern. Lewis parted from me in high health and
very tolerable spirits. He left town, with General Grant, the same
morning on which I started for Cornwall. You shall hear from me
again when I can report progress. Don’t write any more nonsense
about giving me trouble: in the first place, the thing is no trouble; in
the second, I should not mind it one bit if it were.
“I am yours very truly,
“Richard Frere.”
The first thing next morning Frere called upon his friend the
publisher, who, as soon as he understood that nothing beyond
advice was required of him, became very communicative and
agreeable; glanced his eye over the verses and approved of them,
though he added, with a Burleigh-like shake of the head, that he
wished they were anything but poetry. Frere wondered why, and
asked him. In reply he learned that the public mind had acquired a
sadly practical bias, which leading him to suggest that poetry was
the very thing of all others to bring it right again, he was further
informed that the evil was much too deeply seated to be affected by
so weak an application as the poetry of the present day; and the
truth of this assertion appearing undeniable, the subject was
dropped.
“The best thing for you to do with these MSS., Mr. Frere,”
continued his adviser, “would be to get them inserted in some
popular periodical.”
“Well, I don’t object,” returned Frere. “Which had I better send
them to? There’s ‘Gently’s Miscellany,’ and the ‘New Weekly,’ and
‘Gainsworth’s Magazine,’ and half-a-dozen more of’em.”
“What do you suppose would be the result of adopting such a line
of conduct?” inquired his friend.
“Why, as the things are in themselves good, they’d probably put
’em in next month, and send a cheque for the amount, enclosed in a
polite note asking for more.”
“I fear not,” was the answer. “A very promising young friend of
mine sent a nicely written paper to the least exclusive of the
periodicals you have just mentioned; hearing nothing of it, he
ventured at the end of six months to write and inquire its fate. In
reply he received a note from the editor, which appeared to him
more explicit than satisfactory. It was couched in the following
laconic terms:—‘Declined with thanks.’”
“Phewl that’s pleasant,” rejoined Frere. “What would you advise,
then, under the circumstances? I place myself quite in your hands.”
His friend leaned back in his chair and considered the matter
deeply. At length he seemed to have hit upon some expedient, for
he muttered with great emphasis, “Yes, that might do. He could if he
would. Yes—certainly!” Then turning suddenly to Frere, he
exclaimed, “Mind, you’ll never breathe a word of it to any living
being!”
“Not for the world,” returned Frere. “And now, what is it?”
“You’ve heard of ‘Blunt’s Magazine’?”
“Yes; I’ve seen it in several places lately.”
“No doubt; it’s a most admirably conducted publication, and one
which is certain to become a great favourite with the public. Now I
happen to be acquainted with one of the gentlemen who edit it, and
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com