Welcome to the forums Agreaves. Now it's easier to read.
Be careful with code you find. Even in books there seems to be an enormous amount of terrible code around. Actually reading around in the internet and looking at different tutorials for the same issue is much better than a book - you'll become more flexible and you will see both: good and bad code.
That being said, I dislike a few things about that code:
a) Everything what Brad pointed out. Especially the use of the @ is bad practice and unnecessary. The error_reporting setting in the php.ini can be used to show all errors while developping and hiding them from users when your code goes live.
b) The way the stripslashes is incorporated makes the code hard to read. If the function is to be kept outside, then still at least the call to it should be in the main script so that you can see that something is happening to the $_POST array. Also the function is called "stripFormSlashes"...so call the script the same. (The author of that book should give you your money back.)
so either incorporate everything in the script or at least do this (last line of the .inc.php file needs to get deleted and moved to mainscript:
...
require_once("stripFormSlashes.inc.php");
$_POST = stripFormSlashes($_POST);
...
c) look at my sig to see what I think of "or die".
d) you could switch to using mysqli - read about it here
e) you can learn about sessions here and here
I hope we could give you some inspiration to improve that code. Just try and see how far you can get and when you get stuck come back here and we'll help you.
Bjom