radio buttons for indexes

This commit is contained in:
Marc Delisle
2002-02-10 03:17:11 +00:00
parent f924fd6569
commit 579387e7c4
4 changed files with 37 additions and 7 deletions

View File

@@ -28,8 +28,20 @@ $err_url = 'tbl_properties.php3'
if (isset($submit)) {
$query = '';
// Builds the field creation statement and alters the table
// transform the radio button field_key into 3 arrays
$field_cnt = count($field_name);
for ($i = 0; $i < $field_cnt; ++$i) {
if (${'field_key_'.$i} == 'primary_'.$i) {
$field_primary[]=$i;
}
if (${'field_key_'.$i} == 'index_'.$i) {
$field_index[]=$i;
}
if (${'field_key_'.$i} == 'unique_'.$i) {
$field_unique[]=$i;
}
}
// Builds the field creation statement and alters the table
for ($i = 0; $i < $field_cnt; ++$i) {
if (get_magic_quotes_gpc()) {
$field_name[$i] = stripslashes($field_name[$i]);