Location: PHPKode > projects > MyDB > webide/ffdeletefield.php
<?php 
/*************************************************************
 * The MyDB librairy and applications are product of SQLFusion
 * It may be used and/or distributed under the terms of the Q Public
 * License (QPL) version 1.0, enclosed in the file licence.txt.
 ****************************************************************/
/** MyDB IDE Version 0.4    **/ 
/** Author Philippe Lewicki **/

      require("mydbconfig.inc.php");  
 
	/*******
	 * Suppression du champ et de ses valeurs dans la registry
	 *
	 */

if (isset($btnDrop) && $btnDrop == $strNo)
   {  header("Location: formbuilder.php"); 
      exit;
   }

if (isset($btnDrop) && $btnDrop == $strYes)  {
	$query = "delete from $conx->registryTable where rtable='$tablename' and rfield='$fieldname'" ;
	$rdelete = mysql_db_query($conx->db,$query, $idconx); 
	$query = "alter table $tablename drop $fieldname"; 
	$rdelete = mysql_db_query($conx->db,$query, $idconx); 
 	header("Location: formbuilder.php"); 
	      exit;
}

require("hd_inc.php"); 

?>

         <!---- Debut du contenue de la page principal ---->       
<?

if ($fieldname == "uniqid") 
	{
  echo $strCantDelete."<br>";

} elseif (!isset($btnDrop))
   {
  $filenameselfarray = explode("/", $PHP_SELF); 
   $filenameself = $filenameselfarray[count($filenameselfarray)-1]; 

   echo $strDoYouReallyDeleteField." ?<br>";
   ?>
   <form action="<?php echo $filenameself; ?>" method="post" enctype="application/x-www-form-urlencoded">
  <INPUT name="fieldname" value="<?php echo $fieldname; ?>" type="hidden">
  <INPUT name="Poe_Session" value="<?php echo $Poe_Session; ?>" type="hidden">
   <input type="Submit" name="btnDrop" value="<?php echo $strYes; ?>">
   <input type="Submit" name="btnDrop" value="<?php echo $strNo; ?>">
   </form>
   <?php 
   } 
?>
          
       <!--- Fin du contenue de la page Principale --->         

<?php
 require("ft_inc.php"); 
 ?> 

Return current item: MyDB