Well, since you set error reporting to report notices (since E_ALL reports everything), $begin must be defined first.
Now $begin comes from the $_GET array, since you pass it via query string.
Instead of assuming register_globals is On, you should use $_GET['begin']
Now, to actually fix the notice, you can use isset() or empty(), since they do not result in notices when an undefined variable is passed to them.
You could check the value of the variable too, but in this case it doesnt seem necessary.
The code would then be:
<html>
<head>
<title>Xenology Database Install Script</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
/*This document Copyright 2003 Scar's Legion (<a href="http://st.fulco.net" target="_blank">[url]http://st.fulco.net[/url]</a>).
There is no warranty expressed or implied by the use of this script.
Use at your own risk. It is published as linkware, and must retain
all copyrights and links as they where originally programmed. If
you are caught using this script without meeting these standards
you will be prosecuted to the fullest extent.*/
error_reporting(E_ALL);
require("xenosetup.php");
$con = mysql_connect($host, $user, $pass) or die ("I cannot connect to the database because:" . mysql_error());
mysql_select_db($db, $con) or die("I cannot select the correct database because: " . mysql_error());
if (isset($_GET['begin'])) {
$sql = 'CREATE TABLE xeno( id int( 10 ) NOT NULL auto_increment, xeno varchar( 50 ) default NULL , xenotxt text, image varchar( 255 ) default NULL , PRIMARY KEY ( id ) , UNIQUE KEY id( id ) )';
$sql = "INSERT INTO xeno (id, xeno, xenotxt, image) VALUES **snip** ";
echo "Completed.";
} else {
printf("<a href=\"%s?begin=1\">Begin</a><br>", $_SERVER['PHP_SELF']);
}
?>
</body>
</html>
Note that I changed $PHP_SELF to $_SERVER['PHP_SELF'] as well.
EDIT:
incidentally, your $sql variables dont do anything, you may have to actually send the queries, but I presume it is merely part of development.