Location: PHPKode > projects > MyDB > webide/addtable.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");   
    //  page_open(array("sess"=>"MyDB_Session")) ;       
    

     $menu= "table"; 

    if ($addtable) {	
	$query = "create table $newtablename  (id$newtablename INT(10) DEFAULT 1 not null AUTO_INCREMENT, " ;
	$query .=" PRIMARY KEY (id$newtablename), INDEX (id$newtablename), UNIQUE (id$newtablename))"; 
	$conx->sql_query = $query ; 
	$conx->query(); 
	$goto = "formbuilder.php?newtablename=".$newtablename; 
	header("Location: $goto"); 
	}

     include("hd_inc.php"); 
	
?>
<FORM method="get" enctype="application/x-www-form-urlencoded" action="addtable.php">
<INPUT name="goto" type="hidden" value="<? echo $HTTP_REFERER; ?>">
<? echo $strNewTableName; ?> : <INPUT name="newtablename" type="text">
<INPUT type="submit" name="addtable" value="<? echo $strCreateNewTable; ?>">
</FORM>

<?
include("ft_inc.php"); 

?>
<?php page_close() ; ?> 
Return current item: MyDB