Built in Insert record wizard php application

Dreamweaver has an built in application object that allows
you to insert data from a form directly to a database. After
submitting you can go to a web page. In the code there is something
like this $insertGoTo = "yourpage.htm". What I would like to do is
make that open a page in a blank window. I have tried several
different things such as a variable, adding target, adding a href
and nothing has worked.
I appreciate any help. Thanks.

I ran into the same sort of situation where I wanted to
redirect to a page and send form information. It won't work if you
just change the redirect URL.
Have you tried adding the target where the redirect URL is
appended? This worked for me. See below.
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString
<> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString <--- add the target here!
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString <---and here
End If
End If
Good luck!
Sherry

Similar Messages

  • Insert record wizard date format

    Hi,
    How can i change the default insert from mm/dd/yyyy to uk format dd/mm/yyyy
    currently if i insert 08/05/2010 which is the 8th may 2010 in uk it will put it into database as 2010/08/05 which when i retrieve is the 5th august 2010 in uk.
    is there a config folder anywhere i can change this?
    many thanks

    thanks bregent.
    it is php/mysql
    not sure what that other reply is about after yours but thanks for your advice.
    is there no way in dreamweaver to change the preferences like in addt to a specific date format?
    thanks
    Date: Wed, 19 May 2010 12:25:47 -0600
    From: [email protected]
    To:
    Subject: Dreamweaver Application Development Insert record wizard date format
    You didn't mention what DBMS or scripting language you are using.
    The best way to get dates from a user is to supply 3 fields for input; day, month, year - then assemble them into the string format that the DBMS is expecting.
    >

  • Passing parameter from insert record wizard 

    I'm using the Insert Record from the Record Insertion Form
    Wizard. It works fine in that the record does get inserted into the
    table but i am trying to pass a value from one of the fields onto a
    confirmation page.
    My confirmation page will say something like:
    You have just added record <dnum>. Do you want to add
    another record?
    Is this possible?

    I am obviously missing something. In editing the link, I have a user parameter of atab. This is the column that is linked in the report. What do I use as the default value. Does it make a difference if the table does or does not have an index on the atab? The PK is an ID.
    Please help
    Jerry

  • 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.

  • PHP/MySQL Insert Record

    I've got a multi page form that carries values across
    multiple pages with the use of Hidden Fields and then on last page
    inserts the record into a MySQL database (for this I used the built
    in Insert Record function of dreamweaver). My problem is that it
    works well when using Internet Explorer, values are carried forward
    and everything is inserted successfully to the database.
    But, when using Mozilla Firefox it looks as if it works, I
    get the confirmation at the end, but the record is not being
    inserted to the database. I've worked through this step by step and
    the values are being carried across in the hidden fields but it
    just will not insert anything to the database.
    Has anyone got any ideas??
    Thank you in advance.

    Cade06 wrote:
    > Thanks alot for your reply, but I am completely new to
    MySQL, and I am not
    > quite sure how the syntax works. When you say " WHERE
    landlord_username =
    > 'whatever' "I'm not sure what needs to go in the
    'whatever' portion of the
    > code. Do I need to insert static text here or something
    else? I am totally out
    > of my element here, sorry :-/
    It's probably not so much MySQL syntax that's the problem for
    you, but a
    lack of understanding how to work with Dreamweaver
    recordsets, server
    behaviors, and sessions. Building database-driven sites with
    Dreamweaver
    isn't difficult, but there are a lot of things involved.
    The Log In User server behavior automatically creates a
    session variable
    called $_SESSION['MM_Username']. You can use this as a
    parameter to pass
    to the SQL query in the Advanced Recordset dialog box. In the
    SQL area
    you would type (I'm guessing the name of your table and the
    username
    column):
    SELECT landlord_id FROM landlords
    WHERE landlord_username = 'col1'
    Then click the plus button above the Variables area, and
    create a
    Parameter with the following values:
    Name: col1
    Default value: 1
    Runtime value: $_SESSION['MM_Username']
    You can then extract the result of the recordset, and assign
    it to a
    session variable like this:
    $_SESSION['landlord_id'] = $row_recordsetName['landlord_id'];
    > Also, I understand that I need to do this on the login
    page, but do I need to
    > define the recordset again on the add_site page as well?
    I guess I'm still not
    > quite clear on how I specify the session variable as the
    value that needs to be
    > entered in the sites table as the landlord_ID.
    As long as the session is still valid (which it would be if
    you use
    Restrict Access to Page), you will always have access to that
    landlord's
    id through $_SESSION['landlord_id'].
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Validate 2 E-mail address fields in insert record form

    Hello,
    I have used the Insert Record Form Wizard to create a form, including using the Validate Form Server Behavior to validate many fields.
    I can't figure out how to compare & validate 2 E-mail address fields.
    After the form was created I opened the existing Validate Form Server Behavior - Advanced tab and built the condition {sub_email2} != {sub_email} but this had no affect on submitting the form.
    The other thing I tried was creating a new Compare Transaction Field behavior with the same condition {sub_email2} != {sub_email}, this also seemed to have no affect.
    I am just a beginner, so I admit to not really knowing what I'm doing, for me ADDT has been a great aid.
    The other thing I noticed, when I tried both the items above, besides not affecting being able to submit the form with different E-mail addresses. The red asterisks indicating a required field, would disappear.
    Here is the form http://www.oescahealthregistry.org/forms/pedigree_submission.php this version of the form does NOT include either of my attempts to validate the E-mail fields.
    Thanks in advance for your help.
    Dennis

    Hi,
    A compare statement should work fine. As an example I made small form that inserts name and email (2 fields) using Insert record wizard.
    Name field is required, email field is required and checks that its a valid email structure ([email protected]). I then finish the wizard.
    <input type="text" name="email" id="email" value="<?php echo KT_escapeAttribute($row_rsemail['email']); ?>" size="32" />
    <?php echo $tNGs->displayFieldHint("email");?> <?php echo $tNGs->displayFieldError("email", "email"); ?>
    I then add the extra field to the form that the 2nd email will be entered into, this one I called email2, I then copied the display hint and fielderror code from the first email and placed it behind the 2nd email box and changed the text to reflect email2. Which probably doesnt matter but I put it there anyway.
    <input name="email2" type="text" id="email2" size="32" />
    <?php echo $tNGs->displayFieldHint("email2");?> <?php echo $tNGs->displayFieldError("email2", "email2"); ?>
    Now that I have both email fields in the form, I go to the developer tools under server behavior and select compare transactions fields under form validation.
    I hit the + to add a field I then choose email for field, then == for condition, then {POST.email2} for compare to. I enter in an error message and hit ok.
    Thats it the form is ready.
    The first email field will check against email validation and the 2nd email will check against the first email.
    I hope that helps.
    Take note that the database actually only has 2 fields to enter data. Then 2nd email field is only for validation.
    Message was edited by: Albert S.

  • Insert Record not saving values

    Hi,
    I am extremely new to Dreamweaver. I am using MX2004.
    I am trying to work with a remote database that I created in
    MySQL and I am using PHP.
    I created a PHP page added my form, added my input fields,
    and used the Insert Record wizard to get to my database on the
    server. I also went to the columns section and where it says
    ‘Fieldname’ Does Not Get a Value. I went and chose my
    value from the drop-down Value box. It now says
    ‘Fieldname’ Gets Value From
    ‘FORM.Fieldname’ as ‘Text’ I have done that
    for all the columns that I am asking the users to fill in including
    the fields that are NOT NULL.
    The problem is once I test it, it is not putting the data in
    the database. When I go back and look at my columns in the Insert
    Record Server Behaviors, many of my columns have reverted to
    ‘Fieldname’ Does Not Get a Value.
    For some reason my values are not being saved.
    Can someone help with this?
    Thanks,
    Socaprice

    Thanks Mike. I've sloghtly modified my question and reposted
    here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1322354&enterthread=y
    Do you have any thoughts on this?
    Cheers,
    Roger.

  • HTTP 500 with Insert Record

    I have a small ASP form that's been working fine with MS
    Access database. I made some changes. Then I started getting HTTP
    500 Internal Server Error when I'd click the submit button. I've
    tried the following:
    Checked that all files are there and working, i.e. connection
    file, database file, ASP file, file for after submission.
    Checked and tested the ODBC record.
    Checked the driver on the server.
    Created a new connection file from scratch.
    Let Dreamweaver Insert Record Wizard create a new form from
    scratch.
    Intalled Dreamweaver on my server and tested DB connectivity,
    etc. from the server itself.
    Everything seems to work perfectly until you go to the live
    page and submit the form.
    Any help would be appreciated.

    alanray wrote:
    > I have a small ASP form that's been working fine with MS
    Access database. I
    > made some changes. Then I started getting HTTP 500
    Internal Server Error when
    > I'd click the submit button. I've tried the following:
    > Checked that all files are there and working, i.e.
    connection file, database
    > file, ASP file, file for after submission.
    > Checked and tested the ODBC record.
    > Checked the driver on the server.
    > Created a new connection file from scratch.
    > Let Dreamweaver Insert Record Wizard create a new form
    from scratch.
    > Intalled Dreamweaver on my server and tested DB
    connectivity, etc. from the
    > server itself.
    >
    > Everything seems to work perfectly until you go to the
    live page and submit
    > the form.
    >
    > Any help would be appreciated.
    You first need to provide a more detailed error message. In
    internet
    explorer advanced options turn off user friendly errors. Then
    run the
    page again and see what it says.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • 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/

  • DW CS3 Insert Record/Update Record: Record Form Wizard Error

    I have just bought Dreamweaver CS3 and I am running into some
    problems. I also have Dreamweaver MX 2004. When I use the Insert
    Record: Record Insertion Form Wizard on my Dreamweaver MX 2004 I
    have no problems using the Insert Record function. However, when I
    use the Dreaweaver CS3, I am running into errors. The error I am
    getting is the following..."Apache HTTP Server has encountered a
    problem and needs to close. We are sorry for the inconvenience."
    As well, when I use the update form wizard, when you place
    all your settings and place a redirection after updating to a page
    it does not do it, it stays on the same page and gives me the
    following error..."Warning: Cannot modify header information -
    headers already sent in C:\wamp\www\edit.php on line 50".
    This happens on all internet browsers when I want to insert a
    new record. It takes a long time to load the page and then it
    finally gives me an error which I stated above. I never had a
    problem before. I thought maybe I installed the application wrong,
    so I unistalled and reinstalled the DW CS3. I still get the same
    issue. I became so frustrated that I formatted my hard drive
    thinking make I have a adware or spyware, so to be cautious I
    formatted my computer and installed everything with a fresh install
    and still I get this error. Now my testing server that I use is
    called WAMP. I never had problems with it before using DW MX 2004
    or when I used the trial of DW 8. So now I am out of options. Is
    there a glitch in the new CS3 Web Premium that includes DW CS3
    upgrade software and if there is, is there a download. Can anyone
    help me, please.

    Please bare with me David. I know something is wrong because
    I have made two folders, one that is done in MX2004 and the other
    done in CS3. CS3 is generating errors. For example. In the insert
    page in MX2004 I do not need to make a recordset, however, for the
    CS3 insert page I noticed when I use the insert record form wizard
    it does not work unless I make a recordset where in MX2004 I did
    not need to do this. I've created a add.php and a edit.php of
    MX2004 and CS3. I will place it in the attach code so you can see
    side by side what it is generating. I can see that there are a few
    things that CS3 does change and some how it is making my internet
    browsers show an error saying......"Warning: Cannot modify header
    information - headers already sent in C:\wamp\www\edit.php on line
    50".
    What do I do?
    I noticed that in the following code difference in...
    MX2004 = <?php echo $row_rsTest['test']; ?>
    CS3 = <?php echo htmlentities($row_rsTest['test'],
    ENT_COMPAT, 'utf-8'); ?>
    There is a big difference.
    My database is the following...
    -- phpMyAdmin SQL Dump
    -- version 2.10.1
    http://www.phpmyadmin.net
    -- Host: localhost
    -- Generation Time: Jun 24, 2007 at 04:29 PM
    -- Server version: 5.0.41
    -- PHP Version: 5.2.3
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    -- Database: `mysample`
    CREATE DATABASE `mysample` DEFAULT CHARACTER SET latin1
    COLLATE latin1_swedish_ci;
    USE `mysample`;
    -- Table structure for table `test`
    CREATE TABLE `test` (
    `testID` int(11) NOT NULL auto_increment,
    `test` longtext NOT NULL,
    PRIMARY KEY (`testID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
    -- Dumping data for table `test`
    INSERT INTO `test` (`testID`, `test`) VALUES
    (3, 'Sample Test');
    =======================================================================
    I use the program called
    WAMP.
    =======================================================================
    PHP PAGES

  • Record Insertion Form Wizard, page not displaying

    I used the "Record Insertion Form Wizard" in Dreamweaver 8 to
    build the following code. Problem is that when I upload this to my
    server and load the page nothing is being displayed. Anybody have
    any thoughts on this?

    Hi yea,
    you need to upload the includes folder that is created when
    using the
    interakt extensions.
    "Herman2468" <[email protected]> wrote in
    message
    news:e7mmi0$ic3$[email protected]..
    > Dreamweaver's "Record insertion form wizard" creates
    this code in my
    > add_products.php page
    >
    > 1 <?php
    require_once('../Connections/connStore1.php'); ?>
    > 2 <?php
    >
    > 4 //Alternative for PHAkt's functions.inc.php
    > 5 require_once('../includes/tNG_functions.inc.php');
    >
    > 7 //load the tNG classes
    > 8 require_once('../tNG/KT_tNG.inc.php');
    >
    > Which causes this error message:
    >
    > Warning: main(../includes/tNG_functions.inc.php): failed
    to open stream:
    > No
    > such file or directory in
    /home/herm1/public_html/admin/add_product.php on
    > line
    > 5
    >
    > Fatal error: main(): Failed opening required
    > '../includes/tNG_functions.inc.php'
    > (include_path='.:/usr/lib/php:/usr/local/lib/php') in
    > /home/herm1/public_html/admin/add_product.php on line 5
    >
    >
    > Dreamweaver is telling add_products.php to access a
    folder that does not
    > exist.
    > I'm stuck.
    >
    >
    >

  • PHP Form Validation and Insert Records

    Hi There,
    I've been scratching my head for 2 days and couldn't find a solution.
    Here is my problem:
    Go to http://ecopethandbags.com/contactTest.php and click the "Send Comments" button.
    You will see that the validation works.
    Now, go to http://ecopethandbags.com/contactTestInsert.php, this time, I've inserted the "Insert Record" server behavior.
    Click the "Send Comments" button again.
    You will see the ugly message like "Column 'firstname' cannot be null" in a plain white page.
    My question is:
    How can I insert the PHP form records in my database and take advantage of the form validation nicely like in http://ecopethandbags.com/contactTest.php
    I am attaching the files.
    Thank you for you help!

    boloco wrote:
    My question is:
    How can I insert the PHP form records in my database and take advantage of the form validation nicely like in http://ecopethandbags.com/contactTest.php
    Use simple PHP logic to merge the scripts together.
    Dreamweaver automatically puts the Insert Record server behavior code at the top of the script. You need to adapt it so that the validation is done first. If the validation succeeds, use the Insert Record server behavior. If not, redisplay the form.
    if (array_key_exists('send', $_POST)) {
      // validate the form input
      if (!$suspect && empty($missing)) {
      // send the mail
        if ($mailSent) {
        unset($missing);
        // insert the Insert Record server behavior code here

  • Record Insertion Form Wizard Help required

    Hi there
    I am having trouble getting my insertion form to save the
    info to a database. What I want to do is to get customers to
    subscribe to a monthly newsletter by inserting their email
    addresses into a form which should then be saved to a MS Access
    Database. I have made the connection and theres no problems there.
    But when use the record insertion form wizard and try to test it on
    my testing server (offline)...and when I click submit I get the
    following message:
    The page cannot be displayed
    There is a problem with the page you are trying to reach and
    it cannot be displayed.
    Please try the following:
    Click the Refresh button, or try again later.
    Open the localhost home page, and then look for links to the
    information you want.
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services
    Technical Information (for support personnel)
    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] Could not use
    '(unknown)'; file already in use.
    /jb_root/Digest_Subscription.asp, line 113
    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Xtra
    V3.5)
    Page:
    POST 55 bytes to /jb_root/Digest_Subscription.asp
    POST Data:
    Email_Address=[email protected]&MM_insert=form1
    Time:
    Tuesday, 26 September 2006, 10:38:06 a.m.
    More information:
    Microsoft Support
    I have defined a go to page after submitting the info...but
    that doesnt come up and neither does it want to store the input
    data into the database..Can anyone please help me out here.

    Springbok_yfc wrote:
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Microsoft Access Driver] Could not use
    '(unknown)'; file
    > already in use.
    This error is usually associated with a permissions error.
    Check out this technote.
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18802
    Cheers jojo
    Adobe Community Expert for Dreamweaver 8
    http://www.webade.co.uk
    http://www.ukcsstraining.co.uk/
    Extending Knowledge, Daily.
    http://www.communityMX.com/
    Free 10 day trial
    http://www.communitymx.com/joincmx.cfm

  • Insert multiple records with php

    please help me
    I have a problem in a multiple input records
    please help ...............
    example script:
    <?php require_once('Connections/koneksi.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $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_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO mhs (NIM, NAMAMHS, ALAMAT) VALUES (%s, %s, %s)",
                           GetSQLValueString($_POST['NIM'], "text"),
                           GetSQLValueString($_POST['NAMAMHS'], "text"),
                           GetSQLValueString($_POST['ALAMAT'], "text"));
      mysql_select_db($database_koneksi, $koneksi);
      $Result1 = mysql_query($insertSQL, $koneksi) or die(mysql_error());
      $insertGoTo = "baru.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    $maxRows_Recordset1 = 10;
    $pageNum_Recordset1 = 0;
    if (isset($_GET['pageNum_Recordset1'])) {
      $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
    $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
    mysql_select_db($database_koneksi, $koneksi);
    $query_Recordset1 = "SELECT * FROM mhs";
    $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
    $Recordset1 = mysql_query($query_limit_Recordset1, $koneksi) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    if (isset($_GET['totalRows_Recordset1'])) {
      $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
    } else {
      $all_Recordset1 = mysql_query($query_Recordset1);
      $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
    $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
    ?><!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>
    </head>
    <body>
    <p> </p>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table border="1">
        <tr>
          <td>NIM</td>
          <td>NAMAMHS</td>
          <td>ALAMAT</td>
          <td> </td>
        </tr>
        <?php do { ?>
        <tr>
          <td><?php echo $row_Recordset1['NIM']; ?></td>
          <td><?php echo $row_Recordset1['NAMAMHS']; ?></td>
          <td><?php echo $row_Recordset1['ALAMAT']; ?></td>
          <td><table align="center">
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">NIM:</td>
              <td><input type="text" name="NIM" value="" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">NAMAMHS:</td>
              <td><input type="text" name="NAMAMHS" value="<?php echo $row_Recordset1['NAMAMHS']; ?>" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">ALAMAT:</td>
              <td><input type="text" name="ALAMAT" value="<?php echo $row_Recordset1['ALAMAT']; ?>" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"> </td>
              <td> </td>
            </tr>
          </table></td>
        </tr>
        <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
      </table>
      <input type="hidden" name="MM_insert" value="form1" />
      <input type="submit" value="Insert record" />
    </form>
    <p> </p>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>

    PowerMilk wrote:
     I want to update multiple rows with one click on the submit button.Unfortunately, it doesn't work. What is wrong in the code?
    It would be more helpful if you were to say what happens. "It doesn't work" isn't very helpful.
    However, a quick look at your code reveals that your hidden field that contains the ID is outside the loop (repeat region) in your form. Move it inside the loop like this:
    <?php do { ?>
    <tr>
       <td><input name="dag[]" type="text" value="<?php
    echo $row_rsWijzigOpeningsuren['dag']; ?>" size="15" maxlength="15"
    /></td>
       <td><input name="voormiddag[]" type="text" value="<?php echo
    $row_rsWijzigOpeningsuren['voormiddag']; ?>" size="15" maxlength="15"
    /></td>
       <td><input name="namiddag[]" type="text" value="<?php echo
    $row_rsWijzigOpeningsuren['namiddag']; ?>" size="15" maxlength="15"
    /></td>
    </tr>
    <input name="id[]" type="hidden" value="<?php echo $row_rsWijzigOpeningsuren['id']; ?>" />
    <?php } while ($row_rsWijzigOpeningsuren = mysql_fetch_assoc($rsWijzigOpeningsuren)); ?>

  • PHP/MySQL-Update/Insert Record JavaScript Won't Work!!!

    Hi. I'm consistently running into the following error when I use the update or insert record script in CS4. I've tried deleting the FileCache file. I've tried quitting and relaunching, etc. Anyone else seeing this happen? Solutions anyone? Thanks in advance...
    I'm beginning to think it has something to do with the database, and not the script. Does anything in the screenshot below look wrong or problematic?
    Okay, I found the problem. Shouldn't be a problem, but it is...
    The Field name "length" changed to "height" eliminated the problem. So, you can't use the word "length" in a field? Sounds weird to me.

    airsoftie wrote:
    Okay, I found the problem. Shouldn't be a problem, but it is...
    The Field name "length" changed to "height" eliminated the problem. So, you can't use the word "length" in a field? Sounds weird to me.
    There are lots of words you can't use for column names in MySQL, but "length" isn't one of them. See http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html.
    The problem arises because Dreamweaver uses JavaScript behind the scenes to populate dialog boxes and build server behaviors. In JavaScript, "length" is the property of an array. I suspect the problem is that using "length" as a column name has given the relevant JavaScript used by Dreamweaver indigestion.

Maybe you are looking for