Glitching install script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm still new to php and my syntax is not great. 

 

I am getting this notice: 

Notice: Undefined variable: begin in /home/wwwfulc/public_html/install.php
on line 21

 

When I hit subit it just prints " Completed." and doesn't update the
database at all. 

 

Can anyone help me find my glitch in this? 

 

You can see it in action here http://www.fulco.net/install.php

 

You can see the whole file (minus html tags at beginning and end) here
http://www.fulco.net/installphp.txt

Here's the code (minus the SQL Dump). 

PHP:

  _____  

 

<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

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 ($begin){

$sql = 'CREATE TABLE xeno(SQL DUMP HERE)";

        echo "Completed.";

} else {

printf("<a href=\"%s?begin=1\">Begin</a><br>", $PHP_SELF);

}

?>

</body>

</html>

 

  _____  



Your help is appreciated!

 

Yours in Service,

Jason Britton

Scar's <http://st.fulco.net/>  Legion

scar@st.fulco.net

 

Vincit imitationem veritas.

 


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux