Insert Record Behavior - Not passing variables

I have an ASP form which collects information and posts the data to the database on submission and redirects the user to a thank you page.
The user is provided a support request and I would like to provide the user with an auto-generated number created when the database gets created.  However, the Action on the submit form is <%=MM_editAction%> since I'm using the insert record behavior and now I can't seem to pass the form variable over to be used in my results recordset.
Should I use a session variable instead or is there a way to make the insert record bahavior work and pass in the form variable?

So it appears that I'm not the only person with this problem.  One of the solutions I found was to use a Server.Transfer     Server.Transfer("thank_you.asp")
instead of a Redirect.
This works however, now my form validation is broken.

Similar Messages

  • CS4 Insert Record behavior when form spans pages

    Hello!!
    I have a form that spans pages, carrying the values via the session from page to page.
    The insert record behavior only picks up the values from the page in which I am inserting the behaviour (which I understand)
    Can I use the behavior "wizards" to create an insert that will use my session variables or do I have to do it through a script?
    I am relatively new to web coding (php) so any help would be appreciated.
    Thanks to all!! Have a great day...
    Rich

    I think I discovered the answer, but I would appreciate if someone can confirm if it's the right way or wrong way.
    I made hidden input fields, and made the default value the contents of the session variable for each field I brought over from previous pages.
    Seems to work, but is this a good way of doing it or a n00b way?
    Thanks,
    Rich

  • Insert record behavior and multiple dynamic lists

    I have a complex form that contains an insert record
    behavior. Some of the fields are dynamic lists. My database has a
    table to hold the static fields from the form and a number of
    tables to hold the results from each dynamic list. I have the first
    form and another form for review purposes. On the review form I am
    getting an "Invalid argument supplied for foreach()" for each table
    I try to insert the dynamic list results into. My investigation
    leads me to believe that the arrays from the first form are being
    subsumed by the actual insert action and that when my review form
    is called, the arrays ($_POST) are no longer there. How do I ensure
    that the arrays being set in part 1 of the Insert record behavior
    will still be around for the review form? Any time I try to insert
    code into the actual insert code, Dreamweaver duplicates the
    behavior and tells me it can't decide which one to use.

    So it appears that I'm not the only person with this problem.  One of the solutions I found was to use a Server.Transfer     Server.Transfer("thank_you.asp")
    instead of a Redirect.
    This works however, now my form validation is broken.

  • The function javascript:doSubmit not passing variables between pages

    Hi,
    I have an report that has a link to another page, and I'm trying to pass 2 variables. If I use a target URL as such the variables do not get passed, but if I use a page target and explicitly add the item name and values it works fine. Here is the call I'm using to javascript:doSubmit:
    javascript:doSubmit('f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#');
    Does anyone have any insights?
    Thanks,
    Joe

    You can't use doSubmit to pass variables; it will only submit your page with the request you passed in.  All normal page processing and branching will be followed..  Why are you using doSubmit?  Just put the URL in the URL field.
    f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#

  • Moved site - pages with insert record forms not working

    Not sure what has happened here. I have copied a site from:
    www.goodsafariguide.com to:
    www.goodsafariguide.net
    The domains are on a shared reseller hosting account so are both pointing to the same database, but I noticed that pages with ADDT forms were not displaying at all.
    I created a new page just with a basic form, and it works on the .com domain:
    http://www.goodsafariguide.com/campkalahari/newform.php
    But not on the .net domain:
    http://www.goodsafariguide.net/campkalahari/newform.php
    The database connection looks OK - any idea what the issue here could be?
    Thanks.

    Narrowed it down to the error:
    PHP Fatal error:  Class 'tNG_dispatcher' not found in /home/gsgnet12/public_html/campkalahari/index.php on line 27
    I think I can see what all happened now. I originally got thrown because I uploaded the entire site, including a folder containing lots of hi-res photos, that were never uploaded originally. It looks as though files that weren't uploaded when the disk space ran out were still showing up in the file directory, but with a file size of 0k.
    So then when I was reuploading files, Dreamweaver wasn't actually uploading them because it seemed to think they were already uploaded, and I could see them showing up on the remote server, so it all looked OK.
    Anyway - it all looks OK now.

  • Insert record and email

    Hello
    How do I insert a record with the image filename into a database, then send the data just entered as an email?
    I was able to do this before but now this new CS3 seems so complicated!
    I am unable to just use an insert record behavior then add form fields and change the insert or update recored behavior like before.
    Please can I be shown some actual working tutorials on this?
    This search function on this forum does not work as I tried to search for this exact statement "insert record and email" and no records appear.
    Cheers

    Ok, here is the entire page:
    <br />
    <br /><?php require_once('Connections/cnreviva.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_cnreviva = new KT_connection($cnreviva, $database_cnreviva);<br /><br />$editFormAction = $_SERVER['PHP_SELF'];<br />if (isset($_SERVER['QUERY_STRING'])) {<br />  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);<br />}<br /><br />// *** Mail form as Text format ***<br />if (isset($_POST["FX_sendForm"]) && $_POST["FX_sendForm"] == "frmupload") {<br />  $format = strtolower("Text");<br />  if ($format != "html") $format = "plain";<br />  $filefield = "uploadfile";<br />  $top = "\r\n";<br />  $body = "\r\n";<br />  $excludeArray = array("button","button_x","button_y","uploadfile","FX_sendForm","MM_insert","MM_update"); <br />  $i = 0;<br />  while ($i<sizeof($_POST)) {<br />    if (!in_array(key($_POST),$excludeArray)) {<br />      if (is_array(pos($_POST))) {<br />        $postVar = implode(", ", pos($_POST));<br />      } else {<br />        $postVar = pos($_POST);<br />      } <br />      $body .= strtoupper(key($_POST)) . ": " . stripslashes($postVar) . "\r\n";<br />    }<br />    $i++;<br />    Next($_POST);<br />  }  <br />  $bottom = "\r\n";<br />  $from = $_POST["email"];<br />  // set parameters<br />  $recipient = "[email protected]";<br />  $subject = "Test";<br />  $message = $top . $body . $bottom;<br />  // set extra parameters<br />  $headers = "From:" . $from . "\r\n";<br />  $headers .= "Cc:\r\n";<br />  $headers .= "Bcc:\r\n";<br />  require_once("FXInc/FX_mailForm_php.inc");<br />  // send all<br />  mail($recipient, $subject, $message, $headers);<br />  $body = urlencode(str_replace("\r\n", "<br>", $body));<br />  $redirect = "thankyou.php";<br />  if ($redirect) header("Location: " . $redirect);<br />}<br /><br />// Make an insert transaction instance<br />$ins_tblfeedback = new tNG_insert($conn_cnreviva);<br />$tNGs->addTransaction($ins_tblfeedback);<br />// Register triggers<br />$ins_tblfeedback->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$ins_tblfeedback->registerTrigger("END", "Trigger_Default_Redirect", 99, "thankyou.php");<br />// Add columns<br />$ins_tblfeedback->setTable("tblfeedback");<br />$ins_tblfeedback->addColumn("name", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("email", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("city", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("country", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("shoe_size", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("feedback", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("activate", "STRING_TYPE", "POST", "", "N");<br />$ins_tblfeedback->addColumn("photo", "FILE_TYPE", "FILES", "uploadfile", "");<br />$ins_tblfeedback->setPrimaryKey("id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rstblfeedback = $tNGs->getRecordset("tblfeedback");<br />$row_rstblfeedback = mysql_fetch_assoc($rstblfeedback);<br />$totalRows_rstblfeedback = mysql_num_rows($rstblfeedback);<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br />
    <br />
    <br />
    <br />
    <form action="%3C?php%20echo%20$editFormAction;%20?%3E" method="post" name="frmupload" id="frmupload">
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <table width="300" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td>Name
    <br />
    <br />
    <input type="text" name="name" id="name" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Email
    <br />
    <br />
    <input type="text" name="email" id="email" length="20" value="" /></td>
    </tr>
    <tr>
    <td>City
    <br />
    <br />
    <input type="text" name="city" id="city" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Country
    <br />
    <br />
    <input type="text" name="country" id="country" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Image
    <br />
    <br />
    <input name="uploadfile" type="file" id="uploadfile" /></td>
    </tr>
    <tr>
    <td>&#160;</td>
    </tr>
    <tr>
    <td>
    <?php<br /> echo $tNGs->getErrorMsg();<br />?>
    <input type="submit" name="button" id="button" value="Submit" />
    </td>
    </tr>
    </table>
    <br />
    <input type="hidden" name="FX_sendForm" value="frmupload" />
    <br /></form>
    <br />
    <p>&#160;</p>
    <br />
    <br />

  • Add date stamp to insert record

    This should be easy. I would think it's a standard procedure but 5 hours of searching the net, the forums, and experimenting has left me with a loss.
    I've created a simple form with 3 fields, firstName, lastName, eMail
    I've created a SQL database and table with the fields id, date, firstName, LastName, eMail
    The id is an int and the primary key, date is set to datetime the rest are varchar
    I've created a successful Insert Record behavior and now all I want to do is to update the date field with the datetime value when the record is added.
    Things I've tried include a java script to create a date variable, SQL NOW in various forms, a ton of other complex solutions. I've added hidden fields to the form, which got me the closest when I manually entered a value in the same format that I see in the SQL table when I add a row to the table from the PHP admin page.
    Please tell me this is not going to require 30 lines of code and another half day of fussing around.

    Hi Rick,
    Please tell me this is not going to require 30 lines of code and another half day of fussing around.
    with ADDT it´s pretty easy: just make sure that your datetime column gets ADDT´s "datetime" placeholder {NOW_DT} inserted as "entered value":
    Open the Insert Record Transaction dialog box, select the date column and define these settings:
    - Submit as: Date
    - Get value from: Entered Value
    - Value: {NOW_DT}
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Insert Record and Redirect Data

    I have a website where we are adding articles to categories.
    I need to be able to have a user add an article and then have the
    option to add that same article into another category.
    I'm using the INSERT RECORD behavior now but I'm looking for
    an extension that will INSERT RECORD plus redirect the record/data
    to another page so the user can add it to another category.

    I found this in the upload scripts read me file:
    The clsUpload object contains public functions and methods
    which enable you to upload and save files to a web server using
    pure VBScript.
    Read only
    Data Type: Dictionary Collection
    Syntax: object.Form
    Returns a Forms collection consisting of all the Form objects
    parsed from the HTTP header.
    This collection contains all the HTML form elements which are
    not "Files"
    This collection should be used instead of the typical
    "request.form" method to access data from the other form elements
    (if you decide to combine "file" upload elements with other form
    element types, like checkboxes, text boxes, drop-down lists,
    textareas). Why? Because the form data is posted using
    "multipart/form-data" encoding (and needs to be retrieved like
    binary data instead of text data) and therefore the typical
    "request.form" method isn't effective.
    I changed request.form to clsUpload.form but it still did not
    work.

  • Problems with Update Record behavior

    I am sorry to ask this question again since I have not resolved the issue yet.
    When I am using the Dreamweaver Update Record behavior,  I am not able to get the form validation to work.  I implemented the form validation by inserting  onsubmit="return someFormValidation(this);" into the update form created by Dreamweaver.
    When I hit the submit button the JavaScript validation function is not even invoked.
    However when I use the same method for form validation with Insert Record behavior I have no problems.  Is this difference I am observing between the Insert and Update behaviors the way Dreamweaver supposed to work?  If yes how can I do my form validation during an Update Record?
    Note that the pages involved are all php pages, therefore we are talking about server side validation here.
    If anyone can help I will be grateful as I am really stuck...

    I am closing this even though I got no answers as the weird behaviour has disappeared....

  • Allowing a zero as the first digit in an insert record form field

    I have a form that has an insert record behavior applied to
    it. I would like to be able to put a number into one of the form
    fields that begins with the letter zero (i.e. 010507). The trouble
    is that when I insert any number beginning with a zero, the first
    zero in the number gets dropped when it is entered into the
    database. This occured even when I tried changing the field type
    from number to text in Access.

    Oh, I failed to change the field type to "text" in the insert
    record dialogue box as well.

  • Insert Record

    If I use the Insert Record behavior (php) to add a record to
    a mysql table is there a way to automatically return the value of
    an auto-increment field? Thanks in advance for any
    suggestions.

    MichaelS wrote:
    > If I use the Insert Record behavior (php) to add a
    record to a mysql table is there a way to automatically return the
    value of an auto-increment field? Thanks in advance for any
    suggestions.
    http://docs.php.net/manual/en/function.mysql-insert-id.php
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Most recently inserted record

    how can i get most recently inserted record?
    note: there is no date columns.

    It's possible, but not probable (given how your table is likely created).
    TUBBY_ORCL?create table not_likely
      2  (
      3    column1 number
      4  )
      5  rowdependencies;
    Table created.
    Elapsed: 00:00:00.01
    TUBBY_ORCL?
    TUBBY_ORCL?begin
      2    for i in 1 .. 100
      3    loop
      4      insert into not_likely values (i);
      5      commit;
      6    end loop;
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.03
    TUBBY_ORCL?
    TUBBY_ORCL?select *
      2  from not_likely
      3  where ORA_ROWSCN =
      4  (
      5    select
      6      max(ORA_ROWSCN)
      7    from not_likely
      8  );
               COLUMN1
                   100
    1 row selected.
    Elapsed: 00:00:00.01Uses the pseudo column ORA_ROWSCN which increments with each commit performed against the table (as i've enabled row dependencies, otherwise it would track at the block level).
    Assuming you don't have row dependencies enabled on your table, you could consider using flashback query if you know roughly when you are trying to compare to.
    All in all ... if you need to do this for part of the application design, then you need to do more design work on the structures at hand.

  • Built in Record Behaviors & Added Blank Lines

    Mac OS 10.4.7 // DW 8.0.2
    ASP VBScript
    Bug Encountered: When using the built-in Insert Record the
    code view inserts MANY thousands of blank code lines between each
    ASP line of code. It can go from only a dozen to
    thousands of blank lines of code. How can I remove all of
    these extra lines without having to manually remove every line on
    every insert record behavior that I use?

    go to link:
    http://www.massimocorner.com/
    Look for Dreamwever> Productivity and get the Format
    Source 1.1 extension.
    Install and apply it.
    "Digital Muse" <[email protected]> schrieb
    im Newsbeitrag
    news:ed48a0$rge$[email protected]..
    > Mac OS 10.4.7 // DW 8.0.2
    > ASP VBScript
    > Bug Encountered: When using the built-in Insert Record
    the code view
    > inserts
    > MANY MANY blank code lines between each ASP line of
    code. It can go from
    > only
    > a dozen to well over 20, up to 30-ish blank lines of
    code. How can I
    > remove
    > these extra lines without having to manually remove
    every line on every
    > insert
    > record behavior that I use.
    >
    > Regards,
    > Monica Knutson
    > Creative Director
    > Digital Design Services, Inc.
    >

  • PHP URL Variable from Insert Record Issue

    I have a very simplistic forum style website I have put together. Everything is functionally properly except for one aspect. The basic structure is a page that lists the existing threads (ie: ThreadA, ThreadB, and ThreadC). I have the name of these threads stored in a MySQL database table that is used to generate a repeating dynamic table to grow as the number of threads increases. If the user clicks on one of these links they are taken to a page that displays all of the comments pertaining to that thread. All of the comments are stored in another MySQL database table. I perform a query on this comments page to filter the information in the comments database by the thread name which is passed over from the first page via a URL variable. The link attached to the name of the thread in the repeating table that generates the URL variable is "comments.php?thread=<?php echo $row_threads['threadName']; ?>" This works perfectly, If the user clicks on ThreadB they are taken to the comments page where only the comments pertaining to ThreadB have been filtered and displayed. After the user inserts a comment form ThreadB the comments page reloads displaying the newly created comment.
    Also, on the first page, the user has the option to create a new thread; call it ThreadD. The name of this new thread has to be inserted into two tables; one in the master threads table and one in the comments page any time someone adds a comment. (I'm sure there is a better way to structure this, but this was all I could figure out and for my purposes at hand it is sufficient). When the user is taken to this new comment page I have a query set up to pull the last entry in the threads table from the logged in user, ie the newly created thread topic. I have dragged this query to the page to make sure it is pulling the correct thread heading, and it works just fine. What I'm wanting to have happen is after the user enters the first comment I'm wanting them to be redirected to the main comments page with their new comment listed; giving the illusion that the new comment and existing comments page are the same. I'm trying to pass the newly created thread name, ThreadD, in the URL to the main comments page just like I do if they select it from the existing threads page. Under the insert record wizard I click the 'browse' button to select the comments.php page. I then select 'parameters' to add the thread name query as the URL parameter. The generated code is "comments.php?thread=" . $row_threadName['threadName'] . "". The user does go to the main comments page but the URL variable is not coming with it. What I'm left with in the address bar is ..."/comments.php?thread=&" , but it should be ..."comments.php?thread=ThreadD". I tried copying and pasting the URL link from the existing threads page since that works perfectly, and when I do that the main comments page shows up blank after being redirected from the new comments page. If I hard code this, for testing purposes, into the redirect after insertion section (ie: "comments.php?thread=ThreadD") everything works perfectly and the URL in the address bar of the main comments page is "...comments.php?thread=ThreadD&" I noticed the extra "&", but didn't give it much thought since the site is giving me the behavior I'm looking for. My question is, how do I get this new comment page to pass the variable of the newly created thread name to the main comments page to behave like it does when the thread is selected from the list of existing threads? I know it has to do with how the URL variable is either being generated or built from my query, or how I have it listed in the redirect section of the insert wizard, but I can't figure out where I am going wrong. Please let me know if there are any questions or if I need to clarify any aspect. Any and all help is always appreciated. Thank you.

    Ok, so just to summarize so I am understanding this correctly.  You have an ordering page for tires/wheels.  A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.).  But on another summary page the symbol is returning a blank value.
    If this is correct we need to see:
    - First, the code that is inserting the symbol to the database table in question
    - Second, the query and code where you are printing the data to the screen.

  • Use session variable in Insert record

    Help, please!
    I need to add a record to a table; one of the fields in the
    table is the user_id. When I try to use the insert record server
    behavior, there is no way to select the user_id session variable!
    How is this done?

    .oO(Ted Dawson)
    >>>> to select the user_id session variable! How
    is this done?
    >>>
    >>>Use a hidden variable in the form, and assign it
    the value of the session.
    >>
    >> And what if the user manipulates that value? Hidden
    form fields _always_
    >> require a validation on the server. One purpose of a
    session is to avoid
    >> that sensitive data is sent to the client, where it
    can be manipulated.
    >
    >
    >Exactly how is the value of a SESSION VARIABLE
    manipulated by the client?
    It can be manipulated if it's put into a hidden form field.
    Micha

Maybe you are looking for

  • How to Fax with SAP R/3 4.7

    Hey guys, i have to configure our SAP R/3 release 4.7 system, so that it is able to send a Fax. I have read about SAPconnect and the SMTP PlugIn from WebAS. I found many information about the configuration at the SAP system, but nothing about server

  • Refreshing ALV Tree on Input

    Save Environment. Save Yourself. Hi Experts!! I have 2 screens in an application - left being ALV tree (in which user id is an item under a node) and at right I have an input field. Initially, item was showing X and even the input field. Once I chang

  • Oracle XML processor is not handling variable properly

    I use the XML Parser 2.0.2.7 to process an XML transformation but I don't get the expected result. Running this example with other XML Processor get the job done (IBM, Excelon, Microsoft). I read again the normative document on www.w3c.org on XSL and

  • Numbers Template Chooser Dialog Tweak?

    In reference to the Numbers Template Chooser Dialog box... Does anyone know if there is a way to add your recent files to the "Side-Bar?" Here is a picture of the Template Chooser... !http://www.flickr.com/photos/18215579@N06/2228019841/!

  • Not valid purchase asks of refund is it possible?

    Here is my problem, it summarizes not to be made transfer my 42 shield in $8.99 in Ac Milan Fanstasy Manager. I contacted their site, messenger of e-mails, but no answer of their part it has been already 2 days since i wait...