Update form problems

Hello,  I've re-done the update form several times and still get the same issue.  I get the correct data from the database in the form fields. I use the server behavior panel to set the update info and everything looks good.  It recognises the primary Key and the appropriate fields.  However clicking the submit button will send the user to the correct page but not update the database.  I'm thinking the problem is in the button ID.  What should the button parameters be and should the button ID be to update the form?  Is there any thing I'm missing?

Thanks for the response...  Here is the code above the doctype.  I'm just learning so for PHP and mySQL i use the designer a lot.  I'm better with jscript.
<?php require_once('../Connections/mmhsi.php'); ?>
<?php
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;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form2")) {
  $updateSQL = sprintf("UPDATE contracts SET `Contract Start Date`=%s, `Contract End Date`=%s, `Last Service Date`=%s, `Next Service Date`=%s, `LSD Invoice`=%s, `Contract PO`=%s WHERE ContractID=%s",
                       GetSQLValueString($_POST['Contract Start Date'], "date"),
                       GetSQLValueString($_POST['Contract End Date'], "date"),
                       GetSQLValueString($_POST['Last Service Date'], "date"),
                       GetSQLValueString($_POST['Next Service Date'], "date"),
                       GetSQLValueString($_POST['LSD Invoice'], "text"),
                       GetSQLValueString($_POST['Contract PO'], "text"),
                       GetSQLValueString($_POST['ContractID'], "int"));
  mysql_select_db($database_mmhsi, $mmhsi);
  $Result1 = mysql_query($updateSQL, $mmhsi) or die(mysql_error());
  $updateGoTo = "manage_medgas.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  header(sprintf("Location: %s", $updateGoTo));
$colname_GetHospital = "-1";
if (isset($_GET['HospitalName'])) {
  $colname_GetHospital = $_GET['HospitalName'];
mysql_select_db($database_mmhsi, $mmhsi);
$query_GetHospital = sprintf("SELECT * FROM hospitalindex WHERE HospitalName = %s", GetSQLValueString($colname_GetHospital, "text"));
$GetHospital = mysql_query($query_GetHospital, $mmhsi) or die(mysql_error());
$row_GetHospital = mysql_fetch_assoc($GetHospital);
$totalRows_GetHospital = mysql_num_rows($GetHospital);
$colname_getContract = "-1";
if (isset($_GET['ContractID'])) {
  $colname_getContract = $_GET['ContractID'];
mysql_select_db($database_mmhsi, $mmhsi);
$query_getContract = sprintf("SELECT * FROM contracts WHERE ContractID = %s", GetSQLValueString($colname_getContract, "int"));
$getContract = mysql_query($query_getContract, $mmhsi) or die(mysql_error());
$row_getContract = mysql_fetch_assoc($getContract);
$totalRows_getContract = mysql_num_rows($getContract);
$colname_getContact = "-1";
if (isset($_GET['ContractID'])) {
  $colname_getContact = $_GET['ContractID'];
mysql_select_db($database_mmhsi, $mmhsi);
$query_getContact = sprintf("SELECT * FROM contractcontacts, contacts WHERE ContractID = %s AND contractcontacts.ContactID=contacts.ContactID", GetSQLValueString($colname_getContact, "int"));
$getContact = mysql_query($query_getContact, $mmhsi) or die(mysql_error());
$row_getContact = mysql_fetch_assoc($getContact);
$totalRows_getContact = mysql_num_rows($getContact);
?>

Similar Messages

  • Update form problem

    Hi there,
    I'm having a problem updating a table in Oracle Forms 9i....
    The user searches for a match in table A (consists of a sequential primary key and 4 other data fields) and if a match is found the results come up; they then choose one of the data fields by way of a radio button changing its value from y to n. However when it comes to committing it will not allow this and an error message saying cannot insert record pops up...looking at the error says unique constraint violated for the primary key. So its as if its trying to create a new set of data with the same primary key but the differing value for whatever the user chose. All I want is for it to update the data field in the already existing primary key. Just to make sure I
    If there is no match a new primary key is generated with its respective data fields filled in. This inserts and commits fine, since there is no matching primary key. Its when it comes to updating an existing table that I encounter a problem.
    Any ideas?
    Thanks.

    Thanks for the reply Pamela.
    Yes you were right I was using a select into so of course was inserting like you say. Im unfamiliar with the use of queries but had a look at the online help; unfortunately I cant get it to work still :(
    Can you give a few hints on how to go about this?
    At the mo the user will select two criteria which when the second has been selected will search the database for its 3 respective fields (query perfrormed here I guess). All these fields are in the same table and are headed by a primary key which the user will not know. The select into code which I used which inserted fine is as follows:
    select tdid, slota, slotb, slotc
         into :timeslots.tdid, :timeslots.slota, :timeslots.slotb, :timeslots.slotc
         from timeslots
         where bday = :timeslots.bday
         and timeslots.vid = :vtype.vid;
    The tdid is the primary key and slota,b,c, are the radio buttons which is what needs updating when the user selects one and the bday and vid are the criteria with which I am searching.
    That worked fine for inserting - if you could help us with the equivalent query code then that would be great as at the moment I'm pretty stuck!?

  • Problem with ASP "Create form wizard" or "Update form wizard" and "Upload file"

    Until now it used version 3,7 and dinamyc had never had problems with "Create form wizard" or "Update form wizard" and "Upload file" but now when I create the form and shipment a file leaves an error to me:
    Error:
    Error al borrar directorio. Error de seguridad.
    Developer Details:
    Error al borrar directorio. Error de seguridad. El directorio 'E:\web\eds\maqueta\' esta fuera del directorio base 'E:\web\eds\maqueta\fotosactivi2\'. (FOLDER_DEL_SECURITY_ERROR)
    tNG Execution Trace - VIEW
    * tNG_insert.executeTransaction
    o STARTER.Trigger_Default_Starter
    o tNG_insert.doTransaction
    + BEFORE.Trigger_Default_FormValidation
    + tNG_insert.prepareSQL
    + tNG_insert.executeTransaction - execute sql
    + tNG_insert.postExecuteSql
    + AFTER.Trigger_FileUpload*
    + ERROR.Trigger_Default_Insert_RollBack
    * tNG_insert.getRecordset
    * tNG_insert.getFakeRsArr
    * tNG_insert.getLocalRecordset
    * tNG_insert.getFakeRecordset
    * tNG_insert.getFakeRecordset

    Hello,
    Please see this thread http://www.adobeforums.com/cgi-bin/webx/.3bc3c678/2
    for the same problem.
    Regards,
    Razvan RACASANU

  • Problem with update form and date (show 1970-01-01)

    Hi, I've a update form (php/mysql) with many date input field. When my date is 000-00-00 I show 1970-01-01. Why??
    This is the code:
    label for="data_chiusura"><strong>Data chiusura</strong></label>
          <input type="text" name="Data_chiusura" value="<?php echo $string=$row_Recordset1['data_chiusura'];
        if($string == '0000-00-00'){
        $string = '';
        } else {
        $string = date("d-m-Y", strtotime($string));
        }; ?>" id="Data_chiusura">
    Thanks
    k

    Why would the date ever be null? As long as the date has a non-zero, non-null value this function will work correctly.
    I'm a little confused by what you are doing here. So, you are pulling data from a table, and populating forms with it. This particular field is a date field, and the problem is that when the data for that field is a null, you are getting instead a date of 1970-01-01 displayed in that field - is that correct? What do you want to appear there when the data is null? Nothing?

  • Open several instances of the update Form - session state handling problem

    Hi,
    I have a page with a classic report region on a database table and an other page that has an update form region for updating the records on the previous page. The application navigates from the page containing the classic reports region to the update page via the primary key link displayed in the reports region.
    Users tend to open the multiple instances of the update form by right clicking in the browser the primary key links in the classic reports region. I couldn't pinpoint the problem yet, but I have 'data overwrite issues' i.e. records are updated with form item values that are entered in the other - concurrently opened - update forms.
    Is this the 'normal' way of doing things? I think the problem is that APEX keeps track of only one single instance of any item on a page. If the same page is opened several times in the same browser, APEX updates the state of the page and items within with the one on the most recently opened page or submitted page.
    Can I enable users to use the application as they are currently doing, i.e. by opening the update form several times in the same browser concurrently and still make APEX to handle this?
    TIA,
    Tamas

    I would also argue that the amazon.com example is not entirely valid. Opening your products in multiple tabs and hitting "buy" on all of them sounds analogous to multiple "insert"s in our Oracle world...every item is probably not in your cart and so it's possible to stuff three new items into your cart with no conflicts.
    The sticky issue is when you are editing existing data and I am not quite seeing Amazon as an example either of working in multiple windows.
    I went to amazon.com and signed in. I did the following:
    1. Home page came up with suggested items of children's books. I right-clicked on a book (book B) and opened it in a new window and clicked "add to cart". In my original window I clicked on a book (book A) and added it to my cart.
    2. I closed the new window I had opened.
    3. In the original window in which I was dealin with Book A, I clicked "View cart". It had books A and B in it. I didn't have a separate shopping cart for Book A and a separate shopping cart for Book B! Apex would do the same thing.
    4. Now looking at my cart, I hit Ctrl + N and opened a duplicate window. In one window I changed the quantity on Book A to 2 and on the second window I changed the quantity on Book A to 3. When all was said and done, I still had ONE cart and Book A with 3 was the prevailing record. What is it that they would expect Apex to do with a similar situation?
    What is it your users are doing in their amazon.com example that is theoretically different than what Apex supports?

  • Can you move a 'Multiple Image Upload' button  into the 'Update Form'?

    I am able to creat and an Update form and an image upload using the "Update Form Wizard" tool and the "Multiple Image Upload" tool succesfully.
    <br />
    <br />The problem comes when I try to move the "UPLOAD" button inside the Update form. Right now it looks like this:
    <br />http://www.webritesolutions.com/Test/upload/now.JPG
    <br />
    <br />This is how I would like it to show:
    <br />http://www.webritesolutions.com/Test/upload/tryingto.JPG
    <br />
    <br />I want to "Upload" button to go next to the "Update record" button. When I do this I get a javascript error and the "Update record" button is disabled.
    <br />Here is the code of what I tried to do:
    <br />
    <br />
    <br />
    <br />
    <br />
    <table>
    <tr class="KT_buttons">
    <td>
    <?php<br />        // Multiple Upload Helper<br /> echo $muploadHelper->Execute();<br /> ?>
    </td>
    <td colspan="1">
    <input type="submit" name="KT_Update1" id="KT_Update1" value="Update record" />
    <br /></td>
    </tr>
    </table>
    <br />
    <br />Here is the Javascript error:
    <br />http://www.webritesolutions.com/Test/upload/error.JPG
    <br />
    <br />thanks for your help.

    A control can only appear once in the visual tree. So you have to remove it from the Grid before you can add it to the DockPanel.
    This code will move the Border element from the Grid to the DockPanel when you click the button:
    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
    Dim border = CType(LayoutRoot.FindName("myborder"), Border)
    LayoutRoot.Children.Remove(border)
    contain.Children.Add(border)
    End Sub
    <StackPanel>
    <Grid x:Name="LayoutRoot">
    <Border x:Name="myborder" BorderBrush="Black" BorderThickness="2">
    <TextBlock>...</TextBlock>
    </Border>
    </Grid>
    <DockPanel x:Name="contain" Background="Yellow">
    <TextBlock>2</TextBlock>
    </DockPanel>
    <Button Click="Button_Click" Content="Move"/>
    </StackPanel>
    You can try it for yourself. But please post your code as formatted text and not as embedded images if you want anyone to be able to reproduce your issue and help you in the future.
    Please remember to close your threads by marking helpful posts as answer.

  • Help needed for dynamic update form

    I could really use some advice - I've been asked to build a time tracking application (basically a timesheet) and I have a fair bit done but the part I am really struggling with is the best way to accommodate some of the specifications. I am NOT a programmer (I have some coldfusion experience but nothing really advanced) so I have not managed to sucessfully integrate the various methods I've found on the web so far. The database is created and so are all the queries, and I have also written a cfc to handle the drop-down menu logic needed but I don't really know how to integrate it with the form.
    Our production server has ColdFusion MX7 so all the great functionality in the CF8 examples I can't use.
    The issue is the user should ideally be able to add/edit/delete multiple rows at once- I like CFGRID, and the HTML version seems best. The main issue with the Flash version is the scrolling to get to the insert/delete buttons- I couldn't see how to get rid of that. A separate add and edit form could be ok depending on how easy it is to use.
    One problem I have is that I can't work out how to have default values with the grid (the userID which is a session variable, and the date which is constantly changing- there is a cfcalendar for the user to change date).
    The biggest hurdle is the related select drop-downs I need- it's not quite as simple as the city,state,postcode examples. For the first drop down the pick an option- and for only 2 of those options there is a second drop-down. Anything else and it stops there. For the second drop-down, there are 2 options, and depending on which one of these they pick the 3rd drop-down pulls a query from one or another table in the database (2 entirely different things). The three  options have different database tables. The main timesheet table just stores the id number from those tables (so I also need to display the names on the drop-down from the options tables not the number).
    I played with simple and complicated javascript and coldfusion solutions as well, but because it's a form to update records and also because of the above specs I just couldn't get anything to work right. I tried binding with the cfc and nothing would bind, plus I don't know how to make all happen without a page reload.
    Does anyone have any advice for the best approach to this? As I mentioned I've got tables, queries and even a cfc but I'm not too clear on how to put it all together properly within the constraints of MX7.
    PS I also can't post a lot of code because of where I work- I know that's not helpful but am looking for the best approach to this, then I can work on the details. Right now I am jumping from solution to solution and not getting anywhere.

    Well, a lot of code has come and gone because I couldn't make it work, where I'm currently at is:
    <cfform name="updateform" id="updateform" action="#CurrentPage#?#CGI.QUERY_STRING#">
      <cfgrid name="MainData" height="400" insertbutton="add" deletebutton="remove" query="getMainData" insert="yes" delete="yes" rowheight="20"  selectmode="edit" format="html">
      <cfgridcolumn name="id" display="no">
    <cfgridcolumn name="userID" display="no">
    <cfgridcolumn name="entrydate" display="no">
    <cfgridcolumn name="activityID" >
    <cfgridcolumn name="typeID">
    <cfgridcolumn name="projectID" values="#ValueList(getProjects.id)#" valuesdisplay="#ValueList(getProjects.name)#">
    <cfgridcolumn name="time" width="10">
    <cfgridcolumn name="comment" width="150">
    </cfgrid>
    <cfinput type="hidden" name="entrydate" value="#Session.username#">
    <cfinput type="hidden" name="entrydate" value="#editdate#">
    <cfinput name="update" type="Submit" value="Update">
    </cfform>
    ** for some reason getProjects.name doesn't work and causes an error. I haven't worked out how to get the default inputs for the date and user ID to work either. I also tried binding and a flash form somewhere along the way.
    ** the CFC is below, #ds# didn't work and I had to put in the actual DSN name, not sure why, but anyway this is the logic of the thing. Ideally I would like to use this logic with the cfgrid, but I'm not sure if that is possible? It seems like it would be the most user friendly approach.
    The CFC so far is:
    <cfcomponent>
       <cffunction name="getActivities" access="remote" returnType="query">
            <cfquery name="getActivities" datasource="#ds#">
    SELECT * FROM timesheet_activities
    </cfquery>
            <cfreturn getActivities>
        </cffunction>
        <cffunction name="getTypes" access="remote" returnType="query">
        <cfargument name="Activity" type="any" required="true">
        <cfif ARGUMENTS.Activity EQ "">
            <cfset getType = "">
        <cfelse>
            <cfquery name="getTypes" datasource="#ds#">
            SELECT * FROM timesheet_type
            </cfquery>
        </cfif>
        <cfreturn getTypes>
        </cffunction>
        <cffunction name="GetProjects" access="remote" returnType="query">
        <cfargument name="Activity" type="any" required="true">
        <cfargument name="Type" type="any" required="true">
        <cfif ARGUMENTS.Activity EQ "" OR ARGUMENTS.Type EQ "">
            <cfset LstProjects = "">
        <cfelseif ARGUMENTS.Activity EQ "1" OR "3">
        <cfquery name="getProjects" datasource="#ds#">
    SELECT id,name FROM projectsa
    WHERE completed = 'false'
    </cfquery>
    <cfelse>
    <cfquery name="getEProjects" datasource="#dse#">
    SELECT id,name FROM projectsb
    WHERE statusID = '6'
    </cfquery>
        </cfif>
        <cfreturn getProjects>
        </cffunction>
    </cfcomponent>
    Any attempts to actually use the cfc didn't work. I tried to use it with a normal html update form and got the message- failed to bind, Activity didn't exist. I also tried to bind it to a flash grid. The argument for Activity needs to come from the drop-down Activity type selected. Maybe I'm missing something.
    ETA:
    just moved everything to the live MX7 server (because my dev server is Coldfusion8) and I get the following:
    Attribute validation error for tag CFGRID. The tag does not allow the attribute(s) BINDONLOAD,BIND.
    Does this mean I definitely can't use the CFC with the cfgrid on MX7? Or is there a way to do it?
    Any advice would be greatly appreciated.

  • How to create an update form

    I am facing some problems when creating an update form. I have created the form page and the action page. It seems to be working but I have a couple of issues with a list menu and a radio button.
    The code is:
    <!--- Check that ID was provided --->
    <cfif NOT IsDefined("URL.ID")>
      <h1>You did not specify the Alumni ID</h1>
    <cfabort>
    </cfif>
    <!--- Get the alumni record --->
    <cfquery datasource="alumniupdateform" name="queryResults">
    SELECT *
    FROM Alumni
    WHERE ID=#URL.ID#
    </cfquery>
    <!--- Get countries --->
    <cfquery name="Countryquery" datasource="admissions">
          SELECT * FROM Countries ORDER BY CountryName ASC
    </cfquery>
    <!--- Page header --->
    <cfinclude template="includes\header.cfm">
    <!--- Update alumni form --->
    <cfform action="includes\update_action.cfm">
    <!--- Embed primary key as a hidden field --->
    <cfoutput>
    <input type="radio" name="WantRepresent" id="WantRepresent" value="#queryResults.WantRepresent#">
    </cfoutput>
    <cfoutput>
    <input type="hidden" name="ID" value="#queryResults.ID#">
    </cfoutput>
    <table align="center" bgcolor="">
    <tr>
      <th colspan="2">
        <p> </p>
        <p><font size="+1">Update a Alumni Contact</font></p>
        <p> </p></th>
    </tr>
    <tr>
      <td>
       Name:
      </td>
      <td>
       <cfinput type="Text"
                name="aName"
                value="#Trim(queryResults.aName)#"
                message="NAME is required!"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="50"
                maxlength="100">
      </td>
    </tr>
    <tr>
      <td>
       Last Name:
      </td>
      <td><cfinput type="Text"
                name="aLastName"
                value="#Trim(queryResults.aLastName)#"
                message="LAST NAME is required!"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="50"
                maxlength="100"></td>
    </tr>
    <tr>
      <td>
       Company:
      </td>
      <td>
       <cfinput type="Text"
                name="aCompany"
                value="#Trim(queryResults.aCompany)#"
                message="COMPANY is required!"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="50"
                maxlength="100">
                </td>
    </tr>
    <tr>
       <td>E-Mail</td>
       <td><cfinput type="Text"
                name="aEmail"
                value="#Trim(queryResults.aEmail)#"
                message="E-MAIL is required!"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="50"
                maxlength="100"></td>
    </tr>
    <tr>
      <td>
       Preferred Postal Adress::
      </td>
      <td>
       <cfoutput></cfoutput>
       <cfinput type="text"
       name="aPreferredAdress"
       value="#Trim(queryResults.aPreferredAdress)#"
       message="Please provide the company name"
       required="yes"
       validateAt="onSubmit,onServer"
       size="80"
       maxlength="100">
      </td>
    </tr>
    <tr>
      <td>
       Home Phone:
      </td>
      <td>
       <cfinput type="Text"
                name="aHomePhone"
                value="#Trim(queryResults.aHomePhone)#"
                message="Home Phone is required"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="20"
                maxlength="20">
      </td>
    </tr>
    <tr>
      <td>
       Work Phone:
      </td>
      <td><cfinput type="Text"
                name="aWorkPhone"
                value="#Trim(queryResults.aWorkPhone)#"
                message="Work Phone is required"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="20"
                maxlength="20"></td>
    </tr>
    <tr>
      <td>
       Cell Phone:
      </td>
      <td><cfinput type="Text"
                name="aCellPhone"
                value="#Trim(queryResults.aCellPhone)#"
                message="Cell Phone is required"
                required="Yes"
                validateAt="onSubmit,onServer"
                size="20"
                maxlength="20"></td>
    </tr>
    <tr>
       <td>Country:</td>
       <td><!--- Country list --->
       <select name="acountries">
        <cfoutput query="Countryquery">
         <option value="#CountryName#"<cfif Countryquery.CountryName IS queryResults.aCountry>selected</cfif>>#CountryName#</option>
        </cfoutput>
       </select></td>
    </tr>
    <tr>
       <td colspan="2"></td>
       </tr>
    <tr>
       <td colspan="2"> <strong>
            </strong>
            <cfinput type="radio" name="WantRepresent" id="WantRepresent" value="Yes">
            Yes, I want to be a class representative of
    <strong>
      <cfinput type="text" name="aYear" id="aYear" style="visibility:hidden">
    </strong></td>
       </tr>
    <tr>
       <td colspan="2"> </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
       <input type="submit" value="Update">
      </td>
       </tr>
    </table>
    </cfform>
    <!--- Page footer --->
    <cfinclude template="includes\footer.cfm">
    and the action code is this:
    <!--- Update movie --->
    <cfquery datasource="alumniupdateform" name="queryResults">
    SELECT *
    FROM Alumni
    </cfquery>
    <cfquery datasource="alumniupdateform">
    UPDATE Alumni
    SET aName='#Trim(FORM.aName)#',
        aLastName='#Trim(FORM.aLastName)#',
        aCompany='#Trim(FORM.aCompany)#',
        aEmail=#FORM.aEmail#,
        aPreferredAdress='#Trim(FORM.aPreferredAdress)#',
        aHomePhone='#Trim(FORM.aHomePhone)#',
        aWorkPhone='#Trim(FORM.aWorkPhone)#',
        aCellPhone='#Trim(FORM.aCellPhone)#',
        aCountry='#(FORM.acountries)#'
    WHERE Id="#queryResults.ID#"
    </cfquery>
    <!--- Page header --->
    <cfinclude template="includes\header.cfm">
    <!--- Feedback --->
    <cfoutput>
    <h1>Contact '#FORM.aName#' updated</h1>
    </cfoutput>
    <!--- Page footer --->
    <cfinclude template="includes\footer.cfm">
    If someone can help me with this I would really appreciate.
    Thanks

    I see this comment on your form page.
    <!--- Embed primary key as a hidden field --->
    But on your action page, you don't use it.  That's a problem.

  • Undefined index error in checkbox update form

    Hi!
    i have a problem with my update form
    Notice:  Undefined index: accepte_oiseaux in C:\wamp\www\weziwezo\voiturier\mod_vehicule.php on line 96
    Notice:  Undefined index: accepte_chien in C:\wamp\www\weziwezo\voiturier\mod_vehicule.php on line 97
    i need to display checkbox checked  if "checked=\"checked\"";} = 1
    here is my code
    </tr>
         <tr valign="baseline">
           <td nowrap="nowrap" align="right">Accepte oiseaux:</td>
           <td><input type="checkbox" name="accepte_oiseaux" value="" <?php if (!(strcmp($row_rsRecupAuto['accepte_oiseaux'],1))) {echo "checked=\"checked\"";} ?> /></td>
           </tr>
         <tr valign="baseline">
           <td nowrap="nowrap" align="right">Accepte chiens:</td>
           <td><input type="checkbox" name="accepte_chien" value="" <?php if (!(strcmp($row_rsRecupAuto['accepte_chien'],1))) {echo "checked=\"checked\"";} ?> /></td>
           </tr>
         <tr valign="baseline">
           <td nowrap="nowrap" align="right"> </td>
           <td><input type="submit" value="Mettre &agrave; jour l'enregistrement" /></td>
           </tr>
    thank you for your help

    It is a Notice, saying that $row_rsRecupAuto array has no "accepte_oiseaux" element in it.
    Simpler terms: there is no $row_rsRecupAuto["accepte_oiseaux"],
    which might be important or unimportant in your case.
    Where is $row_rsRecupAuto coming from? If from a database, check if you are pulling the correct fields.
    PHP notices are not fatal errors, and can be ignored if necessary and if your code works as expected.
    You can suppress notices by altering the php.ini or just put this code at the top of the page:
    <?php
    error_reporting(E_ALL ^E_NOTICE);
    ?>

  • Update Termiante Problem in the VF02

    Dear SAP Technical Guru's,
    I am facing Update termiante problem in the VF02 Screen .
    MESSAGE
    Update was terminated
    *System ID.... MRD
    Client....... 100
    User..... PWC
    Transaction.. VF01
    Update key... BE944DDDC5AEF1338261001635B0CD06
    Generated.... 09.07.2008, 14:25:50
    Completed.... 09.07.2008, 14:25:50
    Error Info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC*
    Also When I scroll through the Condition records in the billing screen the conditions are disapperaing.
    I have a Userexit attached to it RV60AFZC
    Please suggest the solutions of the problem.
    regards,
    Amlan Sarkar

    I am attaching the code of the userexits:
    ***INCLUDE RV60AFZC.
    This include is reserved for user modifications                      *
    Forms for invoicing                                                  *
    The name of modification modules should begin with 'ZZ'.             *
          USEREXIT_NUMBER_RANGE_INV_DATE                                 *
          USEREXIT_FILL_VBRK_VBRP                                        *
          FORM USEREXIT_NUMBER_RANGE_INV_DATE                           *
          This userexit can be used to determine the numberranges for   *
          the internal document number. This userexit can be used when  *
          the number_ranger should impact the invoice date via table    *
          TVFKD.                                                        *
          If this userexit is active the USEREXIT_NUMBER_RANGE is not   *
          processed anymore, that means this userexit has priority.     *
          US_RANGE_INTERN - internal number range                       *
          This form is called from form LV60AU02 and LV60AU11           *
    FORM USEREXIT_NUMBER_RANGE_INV_DATE USING US_RANGE_INTERN.
    Example: Number range from TVFK like in standard
    US_RANGE_INTERN = TVFK-NUMKI.
    ENDFORM.
          FORM USEREXIT_FILL_VBRK_VBRP                                  *
          This userexit can be used to fill fields in VBRK and VBRP     *
          Be aware, that at this time the work areas KUAGV KURGV        *
          KUWEV and KUREV are not filled.                               *
          This form is called from FORM VBRK_VBRP_FUELLEN.              *
    FORM USEREXIT_FILL_VBRK_VBRP.
    Example: change Tax country
    VBRK-LANDTX = T001-LAND1.
    *{   INSERT         MRDK900206                                        1
    *if sy-tcode = 'VF01'.
    read table xkomv with key kschl = 'ZTOD'.
    if sy-subrc <> 0.
       clear xkomv.
       xkomv-kschl = 'ZTOD'.
       append xkomv.
    endif.
    *endif.
    *----Commented
    READ TABLE XKOMV WITH KEY KSCHL = 'ZTOD'.
    IF SY-SUBRC <> 0.
       CLEAR XKOMV.
       XKOMV-KSCHL = 'ZTOD'.
       APPEND XKOMV.
    ENDIF.
    *----End of comment
    *}   INSERT
    ENDFORM.
    *eject
    regards,
    Amlan Sarkar

  • Update form & date time field

    Platform: ASP classic
    DB: MSSQL
    I have a datetime field on an update form that is giving me
    fits. When
    I do not enter a value it throw an error about wrong data
    type. When I
    put this code in
    if (isnull(CStr(Request.Form("Left_Date")))) then
    that processes the update without the datetime field. The
    else part of
    the statement processes with the datetime field. The if does
    not work.
    Any idea how this situation should be handled?

    jsteinmann wrote:
    > does that column allow nulls?
    This morning I did a little more digging and ended up with
    isdate.
    That solved the problem. I also had another problem, it was a
    kin to
    hitting yourself in the head with a hammer, your head won't
    hurt if you
    quite swinging the hammer.
    But to answer your question, yes it did allow nulls.
    Thanks for the response.

  • Tabs only open in a new window. Ctl T opens a new window NOT a new tab help-last update this problem started. How do I set FF back to open tabs in 1 window

    Tabs only open in a new window. Ctl T opens a new window NOT a new tab help-last update this problem started 2 days ago. How do I set FF back to open tabs in 1 window?
    There is no plus sign and going into optins and changing settings has not worked. I have uninstall FF and reinstall-keeping my personalization-and that was no help.
    Right clicking on FF Icon to open a new tab, or going up to FF drop down tab and clicking on new tab both do not work.
    Help everything opens a new window not a new tab. there seems to be no way to reset this or to chose a different optin. I just downloaded new tabs at end addon and it didn't do a thing.

    as a first troubleshooting step - does it work like normally when you open & run firefox in [[Safe Mode|safemode]] by pressing the shift key while you open firefox (all other instances have to be closed before)...

  • Need to automatically display update date and user in update form field

    Hi all,
    Hopefully someone can help me with this... I am using dreamweaver cs4 and php/mysql.  I have a database table that will be updated by 1-5 different people at random times.  I have everything set up and working, as far as the update function, delete function, add new, etc.  In my update form the last two fields are Last Updated and Last Updated By.  There are fields in the table called 'last_updated' (formatted in PHPmyadmin as timestamp) and 'last_updated_by'.  But how do I get them to update on their own?  Right now it is showing the first entry into the field which I did in the PHPmyadmin table, but it is not updating automatically.  It would be a nice field to have so that we know who has worked on the table and when it was last updated, without the user manually typing that in, which I am sure they would forget to do.  By the way, users will login to this with a username and password before editing the records.
    This is the code for the last row in the update form with those two fields.  It is pulling the fields from the database table, but they do not update automatically...
    <tr>
              <th class="blackfont" scope="row">
                <div align="right">
                  <label for="last_updated">Last Updated Date:</label></div>
              </th>
              <td colspan="3" class="blackfont"><input name="last_updated" type="text" id="last_updated" tabindex="47" value="<?php echo $row_getMember['last_updated']; ?>" size="15" />
                <label for="last_updated_by">Last Updated By:</label>
                <input name="last_updated_by" type="text" id="last_updated_by"tabindex="48" value="<?php echo $row_getMember['last_updated_by']; ?>" size="15" /></td>
    </tr>
    Thanks!
    Kathy

    Here is all the code the the Admin Login page...
    <?php session_start(); ?><!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"><!-- InstanceBegin template="/Templates/TherapyPetsTemplate2.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>TPGC Administrative Login Page</title>
    <!-- InstanceEndEditable -->
    <link href="css/twoColFixLtHdr.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="JavascriptFiles/mootools.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    body {
    background-color: #FFF;
    margin-top: 25px;
    margin-bottom: 25px;
    margin-left: 25px;
    margin-right: 25px;
    background-image: url(Images/images-2.jpg);
    background-repeat: repeat;
    .twoColFixLtHdr #container #webstunning_video_player {
    margin-top: 15px;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    -->
    </style>
    <script src="ajxmenu.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    body,td,th {
    color: #FFF;
    font-size: 100%;
    font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
    .Italic {
    font-style: italic;
    -->
    </style><link rel="stylesheet" href="ajxmenu1.css" type="text/css" />
    <script src="ajxmenu1.js" type="text/javascript"></script>
    <link rel="stylesheet" href="ajxmenu2.css" type="text/css" />
    <script src="ajxmenu2.js" type="text/javascript"></script>
    <link rel="stylesheet" href="ajxmenu4.css" type="text/css" />
    <script src="ajxmenu4.js" type="text/javascript"></script>
    <!-- InstanceBeginEditable name="head" -->
    <script language='JavaScript' type='text/javascript' src='HDWRegistrationAndLogin/validatescripts.js.php'></script>
    <!-- InstanceEndEditable -->
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-28303973-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body class="twoColFixLtHdr">
    <div id="container">
    <div id="header">
    <!-- end #header -->
    </div>
    <div class="AJXCSSMenuScYdSZA"><!-- AJXFILE:../ajxmenu4.css -->
    <ul>
    <li><a href="Index.html">Home</a></li>
    <li><a class="ajxsub" href="AboutUs.html">About Us</a>
      <ul>
       <li><a href="AboutUs.html">About Our Group</a></li>
       <li><a href="Board%20of%20Directors.html">Board of Directors</a></li>
       <li><a href="ServicesWeProvide.html">Services We Provide</a></li>
       <li><a href="TPGCintheNews.html">TPGC in the News</a></li>
      </ul>
    </li>
    <li><a href="Facilities.html">Facilities</a></li>
    <li><a class="ajxsub" href="GetStarted.html">Get Involved</a>
      <ul>
       <li><a href="DoesYourPetHaveWhatItTakes.html">Does Your Pet Have What it Takes?</a></li>
       <li><a class="ajxsub" href="GetStarted.html">Get Started</a>
        <ul>
         <li><a href="Training.html">Training</a></li>
         <li><a href="Testing.html">Testing</a></li>
        </ul>
       </li>
      </ul>
    </li>
    <li><a class="ajxsub" href="HowYouCanHelp.html">How You Can Help</a>
      <ul>
       <li><a href="HowYouCanHelp.html">Ways to Help</a></li>
       <li><a href="DonorsList.html">Our Donors and Sponsors</a></li>
      </ul>
    </li>
    <li><a class="ajxsub" href="MemberProfiles.html">Happy Tales</a>
      <ul>
       <li><a href="MemberProfiles.html">Member Profiles</a></li>
       <li><a href="MemberStories.html">Member Stories</a></li>
       <li><a href="Testimonials.html">Testimonials</a></li>
       <li><a href="PhotoGalleries.html">Photo Gallery</a></li>
      </ul>
    </li>
    <li><a href="FAQs.html">FAQs</a></li>
    <li><a href="Links.html">Links</a></li>
    <li><a href="Form-ContactUs.html">Contact Us</a></li>
    <li><a class="ajxsub" href="#">Login</a>
      <ul>
       <li><a href="MemberLogin.php">Member Login</a></li>
       <li><a href="BoardLogin.php">Board Login</a></li>
       <li><a href="AdminLogin.php">Admin Login</a></li>
      </ul>
    </li>
    </ul>
    <br />
    </div>
    <div id="sidebar1">
       <div>
        <div align="center">
        <br />
    <br />
    <div id="Events">
    <br />
    <div class="EventsHeading" id="EventsHeading">Upcoming Events</div>
    <br />
    <span class="EventsText">
          <!--Date-->
          </span>
          <span class="EventsDate">March 11th</span>
          <span class="EventsText">
    <!--Event Name-->      Members Meeting
          <!--Time-->
          </span>
    <span class="EventsTextDescription"><!--Description-->
    <strong class="MemberPageItemFont">CANCELLED! </strong></span>
    <br />   
    <span class="EventsDate">March 25th</span>
          <span class="EventsText">
    <!--Event Name-->Testing
    <!--Time-->
          </span>
    <span class="EventsTextDescription"><!--Description-->
    12-3 pm   At Bethesda North Hospital. Please contact <a href="mailto:[email protected]?Subject=Sign up for Testing March 25th">Elaine Waxler</a> to sign up for testing, or <a href="mailto:[email protected]?Subject=Question about Testing March 25th">Glenna Mockbee</a> for more details.</span>
    <br />
          <span class="EventsDate">April 15th</span>
          <span class="EventsText">
    <!--Event Name-->      Board Meeting
          <!--Time-->
          </span>
    <span class="EventsTextDescription"><!--Description-->
    12-3 pm   At Bethesda North Hospital. Please contact <a href="mailto:[email protected]?Subject=Delta Testing Question">Glenna Mockbee</a> for details.</span>
    <br />
          <span class="EventsDate">May 20th</span>
          <span class="EventsText">
    <!--Event Name-->      Member Luncheon
          <!--Time-->
          </span>
    <span class="EventsTextDescription"><!--Description-->
    10-4 pm   At Bethesda North Hospital. More details to come.</span>
    <br />
    </div>
        </div>
        <br />
          <hr align="center" width="200" />
          <div align="center"><a href="http://www.facebook.com/pages/Therapy-Pets-of-Greater-Cincinnati/324108054289534?skip_nax_ wizard=true#!/pages/Therapy-Pets-of-Greater-Cincinnati/324108054289534?sk=wall" target="_blank"><img src="Images/Facebook.jpg" alt="Facebook" width="144" height="44" border="0" /></a><br />
            <br />
          </div>
          <hr align="center" width="200" />
          <div align="center">
          <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="TB844UZWVAUVU"><br />
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>
    <br />
            <br />
    <hr align="center" width="200" />
    <!-- InstanceBeginEditable name="SideBar" -->
        <div>
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
         <br />
    <br />
    <br />
        </div>
        <!-- InstanceEndEditable --><br />
      <br />
      <br />
          </div>
    </div>
    </div>
    <!-- InstanceBeginEditable name="MainContent" -->
    <div id="mainContent">
    <span class="GreenHeadingH2">Admin Login</span>
      <br />
      <br />
      <br />
      <br />
    <div align="center"> 
      <p><span class="UnderConstructionFont"><em><strong>***UNDER CONSTRUCTION - PLEASE DO NOT USE YET!</strong></em></span>***</p>
      <p> </p>
      <p><span class="UnderConstructionFont"><em>Please login to manage TPGC lists and information.</em></span><em></em></p>
      <p> </p>
      <p>
    <?php if (!$_SESSION["logged_3"]) { ?>
      </p>
      <form id="hdwlogin" name="hdwlogin" method="post" action="http://www.therapypetsofgreatercincinnati.org/AdminPage.php" onsubmit="return HDW_verify_Login(this)">
        <div id="hdwdivlogin">Enter your username:<br />
          <input type="text" name="username" id="username" />
          <br />
          Enter your password:<br />
          <input type="password" name="password" id="password" />
        </div>
        <div id="hdwdivILMP" style="display:none;"> Enter your email:<br />
          <input type="text" name="hdwILMPemail" id="hdwILMPemail" />
          <br />
          <input type="button" onclick="javascript:HDW_submitILMP()" value="Submit" />
          <a href="javascript:HDW_showLogin()">Login Again</a></div>
        <input type="hidden" name="hdwtable" id="hdwtable" value="3" />
        <input type="hidden" name="hdwokurl" id="hdwokurl" value="http://www.therapypetsofgreatercincinnati.org/AdminPage.php" />
        <br />
        <div id="hdwdivLink" >
          <p>
            <input type="submit" name="subbtn" id="subbtn" value="Submit" />
            </p>
          <p><a href="javascript:HDW_showILMP()">I lost my password</a></p>
        </div>
      </form>
      <p>
        <?php } else { ?>
        Logged as <?php echo $_SESSION["logged_username"]; ?>.
        <br />
      <br />
      <a href="javascript:HDW_logout()">Click here to logout</a>.
      <?php } ?>
      </p>
      <p> </p>
       <p><span class="Caption">To change your password, contact <a href="mailto:[email protected]?Subject=Change my TPGC board password">webmaster</a></span><br />
    </div>
    </div>
    <!-- InstanceEndEditable --><br />
    <br class="clearfloat" />
    <div id="footer">
        <p><img src="Images/x-knead[1].gif" width="98" height="47" align="absmiddle" />        Copyright 2012 Therapy Pets of Greater Cincinnati, a 501(c)(3) organization     Last Updated
          <!-- #BeginDate format:Am3 -->02/25/2012<!-- #EndDate -->           Website by <a href="mailto:[email protected]?Subject=Question or Comment for Webmaster">Kathy McRoberts</a>        <img src="Images/terrier15.gif" width="63" height="60" align="absmiddle" />
          <!-- end #footer -->
          <br />
        </p>
    </div>
    <!-- end #container --></div>
    </body>
    <!-- InstanceEnd --></html>

  • 10.4.11 combo update install problem

    Has anyone else had trouble installing the combo update from 10.4 to 10.4.11?? Mine almost finishes and says it encounters an unknown error and cannot finish the install. Says it moves the update to trash and says try again from the finder...
    HELP!!

    Updating
    Certain steps appear to minimize the risk of an update producing problems.
    Number one is to make sure you have a bootable clone backup of your computer in case you do need to back out of it again. This is the only guaranteed way of not having to worry about the results of an update.
    Some like to boot from their installer discs or an external backup and verify (and if necessary repair) their internal drives as well as drive permissions. This is done with Disk Utility. You can verify a drive while booted from the same drive but sometimes this produces spurious errors. Repairing a drive (if necessary) has to be done while booted from another disk.
    [Resolve startup issues and perform disk maintenance with Disk Utility and fsck|http://docs.info.apple.com/article.html?artnum=106214]
    [Using Disk Utility in Mac OS X 10.4.3 or later|http://docs.info.apple.com/article.html?artnum=302672]
    [Disk Utility's Repair Disk Permissions|http://docs.info.apple.com/article.html?artnum=25751]
    You can also go to the step of booting into safe mode to do the install.
    [Mac OS X: Starting up in Safe Mode|http://docs.info.apple.com/article.html?artnum=107393]
    [What is Safe Boot, Safe Mode? (Mac OS X)|http://docs.info.apple.com/article.html?artnum=107392]
    [Safe Boot takes longer than normal startup|http://docs.info.apple.com/article.html?artnum=107394]
    I like to download the update onto my computer and install it from there rather than let Software Update do it. I know a few people who had problems with doing the update via software updater found a manual install to work.
    Repair permissions again afterward.
    It helps to only install one update at a time and to run the computer for a while to make sure it is behaving well.
    The more cautious even like to unplug third party peripherals (see [comment by BDaqua|http://discussions.apple.com/message.jspa?messageID=9040746#9040746]).
    Almost all of the above steps (except backup) have been questioned (e.g., [Permissons repair|http://www.macworld.com/article/52220-3/2006/08/repairpermissions.html] as to necessity. Probably many people have done successful updates without doing them. I say they can't hurt, they can very likely do good (especially if your computer isn't regularly maintained), so why not do them to be safe?
    [BDaqua's comments on updating problems|http://discussions.apple.com/message.jspa?messageID=8948595#8948595]
    [Baby Boomer's comments on updating problems|http://discussions.apple.com/message.jspa?messageID=9025760#9025760]
    [Klaus1's post on updating and removing updates|http://discussions.apple.com/message.jspa?messageID=10257902] and [another one|http://discussions.apple.com/message.jspa?messageID=10402175]

  • Update form not returning correct data selection in dropdown menu

    Using CS3 DW along with SQL 2008 R2. I have a number of dropdown menus on an entry form (using VBScript/ASP) that are feed by SQL queries. All data is accepted in the entry form and writes to the table in the database without any issues. I created an Update form and based on a Rec ID clicked on from a list the Update form is presented with all the data in the correct fields except for one dropdown menu. All the other menus go to the correct selection except for the one. Spent 2 days attempting to resolve this. If I change the dropdown menu to a field the correct data is presented when the form comes up, but doesn't allow the user to make a selection from the menu. When I change it back to a dropdown menu the saved selection is not selected - just lists the entire list of items in the menu. Any help or ideas on this is greatly appreciated.

    Hello All,
    Once more thank you. I have sorted the issue out.
    I observed that I was selecting the wrong field. I selected the field matching the record set of the select instead of the field matching the record set of the table I am working as seen on the image belew
    I was selecting this - This is the record set of the table that hold values for the city select list
    Instead of this. This is the record set of the table behind the form I am working on
    My issue is now re-solved.
    Mike

Maybe you are looking for

  • Is it possible to have two app icons for the same app?

    I work with Assistive Technologies that enable people with various disabilites to use computing devices, such as the iPad.  Some people do not have the fine motor skills to precisely tap the intended app icon.  If I had a page full of app icons that

  • Error while posting mb1c

    He seniors, I am getting error while posting stock in T. code- MB1C Error- G/L account 799999 dose not exists in company code. dear seniors please suggest me what is menu path or t. code and what are the settings I should maintain their thanks......

  • ClassNotFoundException  (error in lookup  : stub not found by client) ??

    SampleServer.java_ import java.rmi.*; public interface SampleServer extends Remote public int sum(int a,int b) throws RemoteException; SampleServerImpl.java_ import java.rmi.*; import java.rmi.server.*; import java.rmi.registry.*; public class Sample

  • Garbage Collection not releasing memory properly

    Hello, In my web application memory is not releasing properly, after some point of time application throw out of memory error, we are using tomcat5, jdk5, my heap size is half of the RAM.Garbage Collection not releasing memory properly.

  • Favorites menu was on my homepage and is now gone. How do I get it back

    On my homepage, Firefox. I had a favorites menu on the left hand side. Now it is gone. I can get my bookmarks from toolbar but really liked it on the screen for easier access. Hw do I get it back?