i run a install.php, the server says the following statement,
Warning: Undefined index: install in d:\wwwroot\program_files\install.php on
line 14

the strange things is when i install the php program, it does not have
outputted this warning, but this warning occurs when i put all the files to
a remote server

the install.php source is as follows:

// include config, functions, common and header
include ("./include/config.php");
include ("./include/functions.php");
include ("./include/common.php");
include ("./include/header_admin.php");

// variables:
// GET
// $install from install.php (set to 1 when user click on install)

$install = $HTTP_POST_VARS["install"];

if ($table_name != "" and $table_internal_name != "") {
 if ($install == "1") {

  $unique_field_name = get_unique_field($conn, $db_name, $table_name);

  // get the array containing the names of the fields
  $fields_names_ar = build_fields_names_array($conn, $db_name, $table_name);

  // drop (if present) the old internal table and create the new one.
  create_internal_table($conn, $table_internal_name);

  echo "<p>Internal table <b>$table_internal_name</b> correctly

  for ($i=0; $i<count($fields_names_ar); $i++){
   // insert a new record in the internal table with the name of the field
as name and label
   $sql = "insert into $table_internal_name (name_field, label_field,
order_form_field) values ('$fields_names_ar[$i]', '$fields_names_ar[$i]',

   $res_insert = execute_db("$sql", $conn);
  } // end for
  echo "<p>......The system is correctly installed!!";
  echo "<p>You can now manage your table <b>$table_name</b>, starting from
<a href=\"index.php\">index.php</a>";
  echo "<p>In order to customize the internal db you have to use the <a
href=\"admin.php\">administration page</a>.";

  if ($unique_field_name == ""){
   echo "<p>Your table <b>$table_name</b> hasn't any primary keys set, if
you don't set a primary key  won't show the edit/delete/details buttons.";
  } // end if
 } // end if ($install == "1")
  echo "<form name=\"install_form\" action=\"install.php\"
  echo "<input type=\"hidden\" name=\"install\" value=\"1\">";
  echo "<input type=\"submit\" value=\"Click this button to install\">";
  echo "</form>";
 } // end else
} // end if ($table_name != "" and $table_internal_name != "")
 echo "<p>Please specify table_name and table_internal_name in config.php";
} // end else

// include footer
include ("./include/footer_admin.php");

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to