Hello,
I created a dynamic list in Dreamweaver CE4. It pulls info from my database just fine. Prblem is when I click to edit one of the entries the next page (the form page it creates on its own) is blank.
I have searched the help files but cant find anything. Im not sure if Im missing a step or not.
Thank you,
Tim

Recommended Answers

All 6 Replies

Hello,
I created a dynamic list in Dreamweaver CE4. It pulls info from my database just fine. Prblem is when I click to edit one of the entries the next page (the form page it creates on its own) is blank.
I have searched the help files but cant find anything. Im not sure if Im missing a step or not.
Thank you,
Tim

You'll need to post the page code in code tags for us to see if you want accurate help. :)

You'll need to post the page code in code tags for us to see if you want accurate help. :)

Here it is:

<?php require_once('../Connections/Users.php'); ?>
<?php
// Load the common classes
require_once('../includes/common/KT_common.php');

// Load the required classes
require_once('../includes/tfi/TFI.php');
require_once('../includes/tso/TSO.php');
require_once('../includes/nav/NAV.php');

// Make unified connection variable
$conn_Users = new KT_connection($Users, $database_Users);

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

// Filter
$tfi_list_user_7 = new TFI_TableFilter($conn_Users, "tfi_list_user_7");
$tfi_list_user_7->addColumn("`user`.id", "NUMERIC_TYPE", "id", "=");
$tfi_list_user_7->addColumn("`user`.fname", "STRING_TYPE", "fname", "%");
$tfi_list_user_7->addColumn("`user`.laname", "STRING_TYPE", "laname", "%");
$tfi_list_user_7->addColumn("`user`.username", "STRING_TYPE", "username", "%");
$tfi_list_user_7->addColumn("`user`.pass", "STRING_TYPE", "pass", "%");
$tfi_list_user_7->addColumn("`user`.email", "STRING_TYPE", "email", "%");
$tfi_list_user_7->addColumn("`user`.files", "NUMERIC_TYPE", "files", "=");
$tfi_list_user_7->addColumn("`user`.services1", "STRING_TYPE", "services1", "%");
$tfi_list_user_7->addColumn("`user`.services2", "STRING_TYPE", "services2", "%");
$tfi_list_user_7->addColumn("`user`.services3", "STRING_TYPE", "services3", "%");
$tfi_list_user_7->addColumn("`user`.services4", "STRING_TYPE", "services4", "%");
$tfi_list_user_7->addColumn("`user`.services5", "STRING_TYPE", "services5", "%");
$tfi_list_user_7->Execute();

// Sorter
$tso_list_user_7 = new TSO_TableSorter("rs_user_1", "tso_list_user_7");
$tso_list_user_7->addColumn("`user`.id");
$tso_list_user_7->addColumn("`user`.fname");
$tso_list_user_7->addColumn("`user`.laname");
$tso_list_user_7->addColumn("`user`.username");
$tso_list_user_7->addColumn("`user`.pass");
$tso_list_user_7->addColumn("`user`.email");
$tso_list_user_7->addColumn("`user`.files");
$tso_list_user_7->addColumn("`user`.services1");
$tso_list_user_7->addColumn("`user`.services2");
$tso_list_user_7->addColumn("`user`.services3");
$tso_list_user_7->addColumn("`user`.services4");
$tso_list_user_7->addColumn("`user`.services5");
$tso_list_user_7->setDefault("`user`.id");
$tso_list_user_7->Execute();

// Navigation
$nav_list_user_7 = new NAV_Regular("nav_list_user_7", "rs_user_1", "../", $_SERVER['PHP_SELF'], 10);

//NeXTenesio3 Special List Recordset
$maxRows_rs_user_1 = $_SESSION['max_rows_nav_list_user_7'];
$pageNum_rs_user_1 = 0;
if (isset($_GET['pageNum_rs_user_1'])) {
  $pageNum_rs_user_1 = $_GET['pageNum_rs_user_1'];
}
$startRow_rs_user_1 = $pageNum_rs_user_1 * $maxRows_rs_user_1;

// Defining List Recordset variable
$NXTFilter_rs_user_1 = "1=1";
if (isset($_SESSION['filter_tfi_list_user_7'])) {
  $NXTFilter_rs_user_1 = $_SESSION['filter_tfi_list_user_7'];
}
// Defining List Recordset variable
$NXTSort_rs_user_1 = "`user`.id";
if (isset($_SESSION['sorter_tso_list_user_7'])) {
  $NXTSort_rs_user_1 = $_SESSION['sorter_tso_list_user_7'];
}
mysql_select_db($database_Users, $Users);

$query_rs_user_1 = "SELECT `user`.id, `user`.fname, `user`.laname, `user`.username, `user`.pass, `user`.email, `user`.files, `user`.services1, `user`.services2, `user`.services3, `user`.services4, `user`.services5 FROM `user` WHERE {$NXTFilter_rs_user_1} ORDER BY {$NXTSort_rs_user_1}";
$query_limit_rs_user_1 = sprintf("%s LIMIT %d, %d", $query_rs_user_1, $startRow_rs_user_1, $maxRows_rs_user_1);
$rs_user_1 = mysql_query($query_limit_rs_user_1, $Users) or die(mysql_error());
$row_rs_user_1 = mysql_fetch_assoc($rs_user_1);

if (isset($_GET['totalRows_rs_user_1'])) {
  $totalRows_rs_user_1 = $_GET['totalRows_rs_user_1'];
} else {
  $all_rs_user_1 = mysql_query($query_rs_user_1);
  $totalRows_rs_user_1 = mysql_num_rows($all_rs_user_1);
}
$totalPages_rs_user_1 = ceil($totalRows_rs_user_1/$maxRows_rs_user_1)-1;
//End NeXTenesio3 Special List Recordset

$nav_list_user_7->checkBoundries();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="../includes/common/js/base.js" type="text/javascript"></script>
<script src="../includes/common/js/utility.js" type="text/javascript"></script>
<script src="../includes/skins/style.js" type="text/javascript"></script>
<script src="../includes/nxt/scripts/list.js" type="text/javascript"></script>
<script src="../includes/nxt/scripts/list.js.php" type="text/javascript"></script>
<script type="text/javascript">
$NXT_LIST_SETTINGS = {
  duplicate_buttons: true,
  duplicate_navigation: true,
  row_effects: true,
  show_as_buttons: true,
  record_counter: true
}
</script>
<style type="text/css">
  /* Dynamic List row settings */
  .KT_col_id {width:140px; overflow:hidden;}
  .KT_col_fname {width:140px; overflow:hidden;}
  .KT_col_laname {width:140px; overflow:hidden;}
  .KT_col_username {width:84px; overflow:hidden;}
  .KT_col_pass {width:140px; overflow:hidden;}
  .KT_col_email {width:140px; overflow:hidden;}
  .KT_col_files {width:140px; overflow:hidden;}
  .KT_col_services1 {width:140px; overflow:hidden;}
  .KT_col_services2 {width:140px; overflow:hidden;}
  .KT_col_services3 {width:140px; overflow:hidden;}
  .KT_col_services4 {width:140px; overflow:hidden;}
  .KT_col_services5 {width:140px; overflow:hidden;}
</style>
</head>

<body>
<div class="KT_tng" id="list_user_7">
  <h1> `user`
    <?php
  $nav_list_user_7->Prepare();
  require("../includes/nav/NAV_Text_Statistics.inc.php");
?>
  </h1>
  <div class="KT_tnglist">
    <form action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" method="post" id="form1">
      <div class="KT_options"> <a href="<?php echo $nav_list_user_7->getShowAllLink(); ?>"><?php echo NXT_getResource("Show"); ?>
        <?php 
  // Show IF Conditional region1
  if (@$_GET['show_all_nav_list_user_7'] == 1) {
?>
          <?php echo $_SESSION['default_max_rows_nav_list_user_7']; ?>
          <?php 
  // else Conditional region1
  } else { ?>
          <?php echo NXT_getResource("all"); ?>
          <?php } 
  // endif Conditional region1
?>
        <?php echo NXT_getResource("records"); ?></a> &nbsp;
        &nbsp;
        <?php 
  // Show IF Conditional region2
  if (@$_SESSION['has_filter_tfi_list_user_7'] == 1) {
?>
          <a href="<?php echo $tfi_list_user_7->getResetFilterLink(); ?>"><?php echo NXT_getResource("Reset filter"); ?></a>
          <?php 
  // else Conditional region2
  } else { ?>
          <a href="<?php echo $tfi_list_user_7->getShowFilterLink(); ?>"><?php echo NXT_getResource("Show filter"); ?></a>
          <?php } 
  // endif Conditional region2
?>
      </div>
      <table cellpadding="2" cellspacing="0" class="KT_tngtable">
        <thead>
          <tr class="KT_row_order">
            <th> <input type="checkbox" name="KT_selAll" id="KT_selAll"/>
            </th>
            <th id="id" class="KT_sorter KT_col_id <?php echo $tso_list_user_7->getSortIcon('`user`.id'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.id'); ?>">Id</a></th>
            <th id="fname" class="KT_sorter KT_col_fname <?php echo $tso_list_user_7->getSortIcon('`user`.fname'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.fname'); ?>">Fname</a></th>
            <th id="laname" class="KT_sorter KT_col_laname <?php echo $tso_list_user_7->getSortIcon('`user`.laname'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.laname'); ?>">Laname</a></th>
            <th id="username" class="KT_sorter KT_col_username <?php echo $tso_list_user_7->getSortIcon('`user`.username'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.username'); ?>">Username</a></th>
            <th id="pass" class="KT_sorter KT_col_pass <?php echo $tso_list_user_7->getSortIcon('`user`.pass'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.pass'); ?>">Pass</a></th>
            <th id="email" class="KT_sorter KT_col_email <?php echo $tso_list_user_7->getSortIcon('`user`.email'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.email'); ?>">Email</a></th>
            <th id="files" class="KT_sorter KT_col_files <?php echo $tso_list_user_7->getSortIcon('`user`.files'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.files'); ?>">Files</a></th>
            <th id="services1" class="KT_sorter KT_col_services1 <?php echo $tso_list_user_7->getSortIcon('`user`.services1'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.services1'); ?>">Services1</a></th>
            <th id="services2" class="KT_sorter KT_col_services2 <?php echo $tso_list_user_7->getSortIcon('`user`.services2'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.services2'); ?>">Services2</a></th>
            <th id="services3" class="KT_sorter KT_col_services3 <?php echo $tso_list_user_7->getSortIcon('`user`.services3'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.services3'); ?>">Services3</a></th>
            <th id="services4" class="KT_sorter KT_col_services4 <?php echo $tso_list_user_7->getSortIcon('`user`.services4'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.services4'); ?>">Services4</a></th>
            <th id="services5" class="KT_sorter KT_col_services5 <?php echo $tso_list_user_7->getSortIcon('`user`.services5'); ?>"> <a href="<?php echo $tso_list_user_7->getSortLink('`user`.services5'); ?>">Services5</a></th>
            <th>&nbsp;</th>
          </tr>
          <?php 
  // Show IF Conditional region3
  if (@$_SESSION['has_filter_tfi_list_user_7'] == 1) {
?>
            <tr class="KT_row_filter">
              <td>&nbsp;</td>
              <td><input type="text" name="tfi_list_user_7_id" id="tfi_list_user_7_id" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_id']); ?>" size="20" maxlength="100" /></td>
              <td><input type="text" name="tfi_list_user_7_fname" id="tfi_list_user_7_fname" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_fname']); ?>" size="20" maxlength="50" /></td>
              <td><input type="text" name="tfi_list_user_7_laname" id="tfi_list_user_7_laname" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_laname']); ?>" size="20" maxlength="50" /></td>
              <td><input type="text" name="tfi_list_user_7_username" id="tfi_list_user_7_username" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_username']); ?>" size="12" maxlength="12" /></td>
              <td><input type="text" name="tfi_list_user_7_pass" id="tfi_list_user_7_pass" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_pass']); ?>" size="20" maxlength="50" /></td>
              <td><input type="text" name="tfi_list_user_7_email" id="tfi_list_user_7_email" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_email']); ?>" size="20" maxlength="100" /></td>
              <td><input type="text" name="tfi_list_user_7_files" id="tfi_list_user_7_files" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_files']); ?>" size="20" maxlength="15" /></td>
              <td><input type="text" name="tfi_list_user_7_services1" id="tfi_list_user_7_services1" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_services1']); ?>" size="20" maxlength="20" /></td>
              <td><input type="text" name="tfi_list_user_7_services2" id="tfi_list_user_7_services2" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_services2']); ?>" size="20" maxlength="20" /></td>
              <td><input type="text" name="tfi_list_user_7_services3" id="tfi_list_user_7_services3" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_services3']); ?>" size="20" maxlength="20" /></td>
              <td><input type="text" name="tfi_list_user_7_services4" id="tfi_list_user_7_services4" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_services4']); ?>" size="20" maxlength="20" /></td>
              <td><input type="text" name="tfi_list_user_7_services5" id="tfi_list_user_7_services5" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_list_user_7_services5']); ?>" size="20" maxlength="20" /></td>
              <td><input type="submit" name="tfi_list_user_7" value="<?php echo NXT_getResource("Filter"); ?>" /></td>
            </tr>
            <?php } 
  // endif Conditional region3
?>
        </thead>
        <tbody>
          <?php if ($totalRows_rs_user_1 == 0) { // Show if recordset empty ?>
            <tr>
              <td colspan="14"><?php echo NXT_getResource("The table is empty or the filter you've selected is too restrictive."); ?></td>
            </tr>
            <?php } // Show if recordset empty ?>
          <?php if ($totalRows_rs_user_1 > 0) { // Show if recordset not empty ?>
            <?php do { ?>
              <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>">
                <td><input type="checkbox" name="kt_pk__user_" class="id_checkbox" value="<?php echo $row_rs_user_1['id']; ?>" />
                  <input type="hidden" name="id" class="id_field" value="<?php echo $row_rs_user_1['id']; ?>" /></td>
                <td><div class="KT_col_id"><?php echo KT_FormatForList($row_rs_user_1['id'], 20); ?></div></td>
                <td><div class="KT_col_fname"><?php echo KT_FormatForList($row_rs_user_1['fname'], 20); ?></div></td>
                <td><div class="KT_col_laname"><?php echo KT_FormatForList($row_rs_user_1['laname'], 20); ?></div></td>
                <td><div class="KT_col_username"><?php echo KT_FormatForList($row_rs_user_1['username'], 12); ?></div></td>
                <td><div class="KT_col_pass"><?php echo KT_FormatForList($row_rs_user_1['pass'], 20); ?></div></td>
                <td><div class="KT_col_email"><?php echo KT_FormatForList($row_rs_user_1['email'], 20); ?></div></td>
                <td><div class="KT_col_files"><?php echo KT_FormatForList($row_rs_user_1['files'], 20); ?></div></td>
                <td><div class="KT_col_services1"><?php echo KT_FormatForList($row_rs_user_1['services1'], 20); ?></div></td>
                <td><div class="KT_col_services2"><?php echo KT_FormatForList($row_rs_user_1['services2'], 20); ?></div></td>
                <td><div class="KT_col_services3"><?php echo KT_FormatForList($row_rs_user_1['services3'], 20); ?></div></td>
                <td><div class="KT_col_services4"><?php echo KT_FormatForList($row_rs_user_1['services4'], 20); ?></div></td>
                <td><div class="KT_col_services5"><?php echo KT_FormatForList($row_rs_user_1['services5'], 20); ?></div></td>
                <td><a class="KT_edit_link" href="form.php?id=<?php echo $row_rs_user_1['id']; ?>&amp;KT_back=1"><?php echo NXT_getResource("edit_one"); ?></a> <a class="KT_delete_link" href="#delete"><?php echo NXT_getResource("delete_one"); ?></a></td>
              </tr>
              <?php } while ($row_rs_user_1 = mysql_fetch_assoc($rs_user_1)); ?>
            <?php } // Show if recordset not empty ?>
        </tbody>
      </table>
      <div class="KT_bottomnav">
        <div>
          <?php
            $nav_list_user_7->Prepare();
            require("../includes/nav/NAV_Text_Navigation.inc.php");
          ?>
        </div>
      </div>
      <div class="KT_bottombuttons">
        <div class="KT_operations"> <a class="KT_edit_op_link" href="#" onclick="nxt_list_edit_link_form(this); return false;"><?php echo NXT_getResource("edit_all"); ?></a> <a class="KT_delete_op_link" href="#" onclick="nxt_list_delete_link_form(this); return false;"><?php echo NXT_getResource("delete_all"); ?></a></div>
        <span>&nbsp;</span>
        <select name="no_new" id="no_new">
          <option value="1">1</option>
          <option value="3">3</option>
          <option value="6">6</option>
        </select>
        <a class="KT_additem_op_link" href="form.php?KT_back=1" onclick="return nxt_list_additem(this)"><?php echo NXT_getResource("add new"); ?></a></div>
    </form>
  </div>
  <br class="clearfixplain" />
</div>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($rs_user_1);
?>

Pulled straight from http://forums.adobe.com/thread/283608:

"...the secondary page that´s created alongside the Dynamic List will always be initially blank.

Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Though his question was different, the basic principles still apply to the dynamic list creating a blank page by default every time.

Hope this helps.

If it works, please mark the thread solved. :) That way, others will notice it and if they have the same problem, they can find the solution. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.