createtable.php 458 B

12345678910111213141516171819
  1. <?php
  2. require_once 'auth.php';
  3. $sql = "CREATE TABLE ".$_POST['tableid']." ( ".$_POST['sqlcreate']." ) ";
  4. $sql = ereg_replace(";.*", "", $sql);
  5. echo "SQL: ".$sql."<br>";
  6. echo "RESULT: ";
  7. $rs = $adodb->Execute($sql);
  8. if (!$rs) echo $adodb->ErrorMsg();
  9. else {
  10. echo "Create Success";
  11. echo "<script language=javascript>
  12. opener.document.forms[0].tableid.readOnly = true;
  13. opener.document.forms[0].tableid.style.color = 'gray';
  14. </script>";
  15. }
  16. ?>