close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Some fields will not insert??

Thread began 3/20/2010 11:01 pm by mattoconnell298972 | Last modified 3/21/2010 10:55 am by mattoconnell298972 | 823 views | 4 replies

mattoconnell298972

Some fields will not insert??

Hi guys, this one has me stumped. I have used Data Assist to insert and update records many times - however I have a perculiar problem right now.

When I have an insert record instance, just from text fields at this stage, two of my fields will not insert.

All the others do fine. The two that won't insert are no different from the others (that I can see)
What could I possibly have wrong?

I will post the code page - but could the problem be in my database setup?? It appears to be ok??


Thanks!!



<?php require_once("../../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php
require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php require_once('../../Connections/connTest.php'); ?>
<?php require_once( "../WA_Globals/WA_Globals.php" ); ?>
<?php require_once( "../WA_CMS/WA_CMS.php" ); ?>
<?php require_once('../Connections/localhost.php'); ?>
<?php
// WA Application Builder Insert
if ($_SERVER["REQUEST_METHOD"] == "POST") // Trigger
{
$WA_connection = $connTest;
$WA_table = "content";
$WA_sessionName = "contentID";
$WA_redirectURL = "newsDetail.php";
$WA_keepQueryString = true;
$WA_indexField = "contentID";
$WA_fieldNamesStr = "contentTitle|thumbImg|contentHome|contentLong|contentShort|date";
$WA_fieldValuesStr = "".((isset($_POST["contentTitle"]))?$_POST["contentTitle"]:"") ."" . "|" . "".((isset($_POST["thumbImg"]))?$_POST["thumbImg"]:"") ."" . "|" . "".((isset($_POST["contentHome"]))?$_POST["contentHome"]:"") ."" . "|" . "".((isset($_POST["contentLong"]))?$_POST["contentLong"]:"") ."" . "|" . "".((isset($_POST["contentShort"]))?$_POST["contentShort"]:"") ."" . "|" . "".((isset($_POST["contentDate"]))?$_POST["contentDate"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_connPriefert;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>
<?php require_once("../../HTMLEditor/WARichEditorPHP.php"); ?>
<!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>Priefert Australia - News Insert</title>
<script type="text/javascript" src="../css/mootools.js"></script>
<style type="text/css" media="all">
@import url('css/admin.css');
</style>
<!--[if IE 5]>
<style type="text/css">
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftColumn1 {
width: 170px;
}
#outerWrapper #contentWrapper #rightColumn1 {
width: 170px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper #content {
zoom: 1;
}
</style>
<![endif]-->
<script type="text/javascript" src="../CSSMenuWriter/cssmw/menu.js"></script>
<style type="text/css" media="all">
<!--
@import url("../CSSMenuWriter/cssmw/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("../CSSMenuWriter/cssmw/menu_ie.css");
@import url("../css/admin_ie6.css");
</style>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../css/color.css" />
<link rel="stylesheet" type="text/css" href="../css/template.css" />
<link rel="stylesheet" type="text/css" href="../css/navigation.css" />
<link rel="stylesheet" type="text/css" href="../css/navigation_color.css" />
<link rel="stylesheet" type="text/css" href="../css/my_styles.css" />
<link href="../../WA_DataAssist/styles/Refined_Pacifica.css" rel="stylesheet" type="text/css" />
<link href="../../WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
</head>
<body id="subPage" onload="">
<div id="outerWrapper">
<div id="header">
<div class="left">
<a href="#"><img src="../../images/logoMain.png" alt="Power CMS" width="267" height="80" border="0" /></a>
</div>
<div class="right">

</div>
</div>
<div id="topNavigation">

<?php require_once("../CSSMenuWriter/cssmw/menu.php"); ?>
</div>
<div id="innerContainer">
<div id="innerRightContacts">
<div class="WADAInsertContainer">
<form action="newsInsert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm">
<div class="WADAHeader">
<p>&nbsp;</p>
<p>Create News Item
</p>
</div>
<p>Remember to select your thumbnail image to use before you press submit at the bottom.<br />
This image will also be used on the News Directory page.
</p>
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/Pacifica/Refined_tx.gif" alt="" height="1" width="1" border="0" /></div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th width="101" class="WADADataTableHeader"></th>
<td width="504" class="WADADataTableCell"><input type="hidden" name="contentID" id="contentID" value="" /></td>
</tr>
<tr>
<th class="WADADataTableHeader"><div align="left">Date:</div></th>
<td class="WADADataTableCell"><input type="text" name="contentDate" id="contentDate" value="<?php
print date('D, d M Y');
?> " size="20" /></td>
</tr>
<tr>
<th class="WADADataTableHeader"><div align="left">Title:</div></th>
<td class="WADADataTableCell"><input type="text" name="contentTitle" id="contentTitle" value="" size="60" /></td>
</tr>
<tr>

<th class="WADADataTableHeader"><div align="left">Thumbnail <br />
Image:</div></th>
<td class="WADADataTableCell"><input type="text" name="thumbImg" id="thumbImg" value="" size="60" /></td>
</tr>
<tr>
<th colspan="2" class="WADADataTableHeader"><div align="left">
<p>This content will appear on the home page when it is the most recent item.<br />
<br />
<textarea id="contentHome" name="contentHome" rows="3" cols="60" style=""></textarea>
</p>
<p>&nbsp;</p>
<p>This content will appear on the 'News and Events' page - maybe 4 to 6 lines of text and small image.<br /><br />
There will be an image from the thumbnail you just uploaded.</p>
</div></th>
</tr>
<tr>
<th colspan="2" class="WADADataTableHeader"><div align="left">
<p>
<textarea id="contentShort" name="contentShort" rows="6" cols="60" style=""></textarea>
<br />
</p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<p>This is the detailed content which will appear on the News Detail page.<br />
Add all content you would like to be visible.</p>
</div></th>
</tr>
<tr>
<th class="WADADataTableHeader"><div align="left">Detailed Content:</div></th>
<td class="WADADataTableCell"><input type="text" name="contentLong" id="contentLong" value="" size="60" /></td>
</tr>
</table>
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/Pacifica/Refined_tx.gif" alt="" height="1" width="1" border="0" /></div>
<div class="WADAButtonRow">
<table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" hspace="0" vspace="0" border="0" name="Insert" id="Insert" value="Insert" alt="Insert" src="../WA_DataAssist/images/Pacifica/Refined_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="newsResults.php"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="../WA_DataAssist/images/Pacifica/Refined_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>
</div>
</div></div>
<div style="clear: both"></div>
</div>
<div id="footer"></div>
</body>
</html>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...