Dreamweaver server behaviors, can not insert data into the database

Hi, I tried to use server behaviors to add registration information in my database in my registration page.

(1) that I created a login page, and it works very well. This means that connections and the connection works fine database so it can match the record in my database.

(2) but when I tried to download the news in the form of database, it does not work. When I clicked on the service behavior to double check the action "insert data", it always jumps the error message: "When executing inspectserverbehavior in InsertRecord.htm, a javascript error occurred."

I copied my code below. Except the form code and a little jquery is written by me, most of the code generated by Dreamweaver.

<? php require_once('Connections/MAMPPRO.php');? >

<? PHP

If (! function_exists ("GetSQLValueString")) {}

function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

{

If (via 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 "set":

$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

break;

}

Return $theValue;

}

}

$editFormAction = $_SERVER ['PHP_SELF'];

If (isset {}

$editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

}

If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "Register_Form")) {}

$insertSQL = sprintf ("INSERT INTO"user identity"(Ui_LastName, Ui_Email, Ui_FirstName, Ui_Password) VALUES (%s, %s, %s %s)", ")

GetSQLValueString ($_POST ['Register_Firstname'], "text").

GetSQLValueString ($_POST ['Register_Lastname'], "text").

GetSQLValueString ($_POST ['Register_Email'], "text").

GetSQLValueString ($_POST ['Register_Password'], "text"));

@mysql_select_db ($database_MAMPPRO, $MAMPPRO);

$Result1 = mysql_query ($insertSQL, $MAMPPRO) or die (mysql_error ());

$insertGoTo = "LoginSuccessful.php";

If (isset {}

$insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;

$insertGoTo. = $_SERVER ['QUERY_STRING'];

}

header (sprintf ("location: %s", $insertGoTo));

}

@mysql_select_db ($database_MAMPPRO, $MAMPPRO);

$query_Recordset1 = "SELECT *"IDENTITY of the user;"

$Recordset1 = mysql_query ($query_Recordset1, $MAMPPRO) or die (mysql_error ());

$row_Recordset1 = mysql_fetch_assoc ($Recordset1);

$totalRows_Recordset1 = mysql_num_rows ($Recordset1);

? >

<! doctype html >

< html >

< head >

< meta charset = "UTF-8" >

Registeration < title > < / title >

"< link href="jquery-mobile/jquery.mobile-1.3.0.min.css "rel ="stylesheet"type =" text/css">

"< script src="jquery-mobile/jquery-1.8.3.min.js "type =" text/javascript"> < / script >

"< script src="jquery-mobile/jquery.mobile-1.3.0.min.js "type =" text/javascript"> < / script >

< / head >

< body >

< div data-role = 'page' id = "registrationpage" >

< div data-role = "header" >

< h1 > welcome!    < / h1 >

< h1 > register yourself! < / h1 >

< / div >

< data-role = 'content' div > < / div >

< do action = "<?" PHP echo $editFormAction;? ">" method = "POST" id = "Register_Form" name = "Register_Form" >

< p >

< label > Email < / label >

< input name = "Register_Email" type = "email" required id = form register_email = "Register_Form" title = "Register_Email" >

< label > < br >

Password < / label >

< input name = "Register_Password" type = "password" required id = form register_password = "Register_Form" title = "Register_Password" value = "" >

< /p >

< p >

< label > name < / label >

< input name = "Register_Lastname" type = "text" required id = form register_lastname = "Register_Form" title = "Register_lastname" value = "" >

< label > < br >

First name < / label >

< input name = "Register_Firstname" type = "text" required id = form register_firstname = "Register_Form" title = "Register_Firstname" value = "" >

< /p >

< name of entry = "MM_insert" type = 'submit' form 'Register_Form' value = 'Registration' = >

< input type = "hidden" name = "MM_insert" value = "Register_Form" >

< / make >

< a href = "index.php" data-role = "button" > return to connection < /a > "

< div data-role = "footer" >

footer < h4 > < / h4 >

< / div >

< / div >

< / body >

< / html >

<? PHP

mysql_free_result ($Recordset1);

? >

Finally I found the problem.

It seems in my setting, MAIL does not work in live mode DW. But if moved to any explores, it works fine.

Adobe really needs to improve its management of PHP.

Tags: Dreamweaver

Similar Questions

  • How to insert data into the database using smartview

    Hello
    I am trying to insert data into the database using * "Send data" * button on the Ribbon of Essbase.
    My database is empty.

    I opened an ad hoc network, it returns * "#missing" * in all cells
    I have modified the cells and provided data in the cells that I want to. Now, I supported on * "Send data" * button.
    It just reloaded the adhoc grid instead of submit data, I rechecked the data through data console Administrative Service are not inserted.

    I am following the right way to insert data? If not, could you please suggest me how (Populate) insert default data in the database?

    --
    VINET

    You go about it the right way, once you have submitted if you réactualisiez then data values should be there, if you POV is against members of dynamic calc and then data not written to the database, you need to check the Member properties of your POV.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Cannot insert data into the database

    Hello world

    I stuck with a problem in DB juice. When I try to insert data into the database using DB tool, I get a repeated error message (error 1). Please find the my vifile below and solve say.

    Problem is use Labiew 8.2. So try to answer accordingly

    Try it with a cluster instead of a string or an array.

  • Error inserting data into the database of JSF

    Hi all

    I have a form and a button of validation. I created the form using the editable view object created on an entity object. When the student has table (base table of data in which I have to enter data) was empty, I managed to insert the data into the table.when I run the same second time application it shows data that I entered previously. But iam able to modify this data and insert the new record again. What should I do so that it does not show the data I already inserted previously when I run again. I think that iam missing something. Please suggest.

    Thank you.

    Here are two ways to achieve the same thing:

    -If you use taskflows, you can add createInsert action as activity by default and then have a navigation from this at the registration page so that the creation form will be shown on the loading of the page. As a result, you can directly enter and validate.
    -If not, have binding action createInsert in your pagedef and add an executable invokeAction for the same thing with prepareModel so that the registration form empty appears when loading the page

    Jean Lou

  • Insert data into the database of the text box

    Hi all

    I'm new to ADF. I have 5 text entry fields and a button "submit" in a JSF page. Whenever I click the button submit data entered by the user must be updated in the database. Please view the example code if possible.

    Thank you.

    First, you will need to create EO and then create from VO EO.

    Add create VO to AM using the data model section.

    Refresh data control and create the jsff page and drag - created déposer VO on the page.

    Then select shape > ADF form in the next window check the box include a Submit button.

    You can now enter data in table

    Samples

    http://wiki.Oracle.com/page/ADF+faces+features+examples

    Published by: sameera.sac on June 27, 2011 18:01

    Published by: sameera.sac on June 27, 2011 18:03

  • Insert data into the database lines selected in a gridview

    Good night.

    I have a little doubt who would like to see clarified.

    I want / need to select several rows in a gridview and then insert the selected value of the line in the database.

    What should I do to take only the values and send them to the database to help, for example, a stored procedure?

    Thank you.

    Hello

    Assuming that already find you a way to determine the selected line in the gridview, the next steps are as simple as,
    1 loop through the selected lines in gridview
    2. generate the sql insert statement and OracleCommand based on line
    3. open OracleConnection
    4. call the ExecuteNonQuery method

    See you soon,.
    [Nur Hidayat | http://nur-hidayat.net/]

  • How to insert data into the database of the fields that have already been assigned values?

    Hi all

    I'm sorry for the question, I'm still new to the OPS

    Here's the thing.

    I have 4 points messageTextInput in my page. each of these 4 field is associated with an attribute of the VO.

    3 of these items have their value already defined in the processRequest of the Commander, like this:

           
          OAMessageTextInputBean factureItem = (OAMessageTextInputBean)webBean.findChildRecursive("factureItem");
          factureItem.setValue(pageContext,pnumfacture);
    
           OAMessageTextInputBean actionItem = (OAMessageTextInputBean)webBean.findChildRecursive("actionItem");
           actionItem.setValue(pageContext,pidaction);
           
          Date sysDate = new Date(); 
           OAMessageDateFieldBean dateSystemItem = (OAMessageDateFieldBean)webBean.findChildRecursive("dateSystemItem"); 
             dateSystemItem.setValue(pageContext,sysDate);       
    

    The user must enter the value of the 4th field.

    I used the classic entry code for data as follows:

    in the AM, I added,

        public void insertRecord(){
        
        OAViewObject vo = getTraceVO1();
        OADBTransaction trans = getOADBTransaction();
        
            if (!vo.isPreparedForExecution()) 
              { 
                    vo.executeQuery(); 
              }
        
        TraceVORowImpl v_row;
        v_row = (TraceVORowImpl)vo.createRow();
        vo.insertRow(v_row);
       v_row.setNewRowState(v_row.STATUS_INITIALIZED);
      }
    public void apply()
       {
          getTransaction().commit();
        }
    

    In the processRequest of the Commander, I added:

          if (!pageContext.isFormSubmission())
            {        
             am.invokeMethod("insertRecord",null);       
            } 
    

    in the processFormRequest of the CO, I added:

          if(pageContext.getParameter("submitButtonItem")!=null){
                         
                am.invokeMethod("apply");
          throw new OAException("Trace Created successfuly",OAException.CONFIRMATION);
          }
    

    When I run my page, I get the error message saying that myVO not records, the records were removed or the view instance has been initialized incorrectly.

    Can someone please tell me what this means?

    Kind regards

    Afaf

    Afaf,.

    Please try to use the code below and see what happens:

    Replace the insertRecord in the AM method with this.

    Import oracle.jbo.domain.Number;

    public void insertRecord(String pnumfacture, String pidaction){ 
    
      System.out.println("been  in insert method");
      OAViewObject traceVO = getTraceVO1();
      OADBTransaction trans = getOADBTransaction(); 
    
      /*if (!traceVO.isPreparedForExecution())
      {
      traceVO.executeQuery();
      }
      */
      traceVO.setWhereClause(null);
      traceVO.setWhereClauseParams(null);
      traceVO.setWhereClause("1=2");
      traceVO.executeQuery();
    
      Number pidAction;
      try{
      pidAction = new Number(pidaction);
      }catch(Exception e) {}
    
      TraceVORowImpl traceVORow;
      traceVORow = (TraceVORowImpl)traceVO.createRow();
      traceVORow.setIdFacture(pnumfacture);
      traceVORow.setIdAction(pidAction);
      traceVORow.DateSysteme(this.getOADBTransaction().getCurrentDBDate());
      traceVO.insertRow(traceVORow);
      //traceVORow.setNewRowState(traceVORow.STATUS_INITIALIZED); 
    
      System.out.println("been  in insert method");
    } 
    

    Replace the processRequest of the second Commander by this:

    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    {
      System.out.println("first time in processForm of CO2");
      String pnumfacture = null;
      String pidaction = null; 
    
      super.processRequest(pageContext, webBean); 
    
      OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean); 
    
      if(pageContext.getParameter("pnumfacture")!=null)
      {
      pnumfacture = pageContext.getParameter("pnumfacture").toString();
      } 
    
      if(pageContext.getParameter("pidaction")!=null)
      {
      pidaction = pageContext.getParameter("pidaction").toString();
      } 
    
        System.out.println("been  in processRequest before assign variables of CO2"); 
    
      System.out.println("pnumfacture :" + pnumfacture);
      System.out.println("pidaction :" + pidaction);
    
    /*assign values to the 3 fields*/
          /*
       Date sysDate = new Date();
          OAMessageTextInputBean factureItem = (OAMessageTextInputBean)webBean.findChildRecursive("factureItem");
          factureItem.setValue(pageContext,pnumfacture); 
    
          System.out.println("been  in processRequest after assign variables of CO2"); 
    
           OAMessageTextInputBean actionItem = (OAMessageTextInputBean)webBean.findChildRecursive("actionItem");
           actionItem.setValue(pageContext,pidaction); 
    
           OAMessageDateFieldBean dateSystemItem = (OAMessageDateFieldBean)webBean.findChildRecursive("dateSystemItem");
           if(dateSystemItem != null)
           {
             dateSystemItem.setValue(pageContext,sysDate);
           }
           */
        Serializable parameters[] = {pnumfacture, pidaction};
        Class paramTypes[] = {String.class, String.class};
    
           am.invokeMethod("insertRecord",parameters, paramTypes);
           System.out.println("been  in processRequest of CO2 after invokeMethod"); 
    
      }
    

    Let us know what happens.

    You can get an error that I have just change this in Textpad and may have syntax errors. If you can't fix those apply here.

    See you soon

    AJ

  • Insert data into the source of destinator Table

    Hi all

    Need to insert data in sample_table1 table xxc_source_table sample_table2

    create table xxc_source_table (DESCRIPTION varchar2 (10));

    Insert the table xxc_source_table values('A201.) ABC.4084.GR');

    create table sample_table1 (col_1 varchar2 (10), col_2 varchar2 (10), col_3 varchar2 (10), col_4 varchar2 (10));

    create table sample_table2 (col_1 varchar2 (10), col_2 varchar2 (10), col_3 varchar2 (10), col_4 varchar2 (10), moved_flag varchar2 (2));

    col_1 = A201

    col_2 = ABC

    col_3 = 4084

    col_4 = GR

    Note: Insert data into the col_1, the col_3, the col_4 of the xxc_source_table sample_table1

    (2) if the next (form xxc_source_table) data is exist in the sample_table2, and then set the moved_flag as Y in this column

    3) xxc_source_table has 17000 lines

    Thank you.

    Post edited by: Rajesh123 please do not consider cross the line message

    Hi Renon,

    Why you don't want substr and instr? For best performance, you should go with substr and instr instead of regexp_substr. However you asked me to provide the code instead of substr and InStr. Then try the below...

    INSERT ALL

    IN VALUES sample_table1 (col1, col2, col3, col4)

    IN sample_table2 VALUES (col1, col2, col3, col4, 'Y')

    SELECT REGEXP_SUBSTR (DESCRIPTION,'[^.] +', 1, 1) col1,.

    REGEXP_SUBSTR (DESCRIPTION,'[^.] +', 1, 2) col2.

    REGEXP_SUBSTR (DESCRIPTION,'[^.] +' 1, 3) col3.

    REGEXP_SUBSTR (DESCRIPTION,'[^.] +' 1, 4) col4

    OF xxc_source_table;

    Thank you

    Ann

  • Reading file and dump the data into the database using BPEL process

    I have to read the CSV file and insert data into the database... To do this, I created some asynchronous bpel process. Adapter filed added and associated with the receive activity... Adapter DB has added and associated with the Invoke activity. Receive two total activity are available in the process when trying to Test em, receive only the first activity is complete and awaits the second receive activity. Please suggest how to proceed with...

    Thanks, Maury.

    Hi Maury,

    There is no need in step 2 that u mentioned above. I donot find useless a webservice?

    The process will be launched by the CSV file, then using the processing activity, you can put it in the DB.

    There should be no way where you can manually test it by giving an entry. All you can do to test is to put the file in the folder you mentioned when configuring the file adapter.

    You just need to have the composite as below:

    ReadCSVFile---> BPEL--> DB adapter

    And in your BPEL process:

    Recieve--> Transformation activity--> call activity

    Try to work on some samples listed on the oracle site and go through the below URL:

    The playback of the file adapter feature using

    Thank you

    Deepak.

  • How to insert data into the table by using the expression builder in the assign activity

    How to insert data into the table by using the expression builder in affect business in BPEl, I use SOA Suite 11.1.1.5
    Can someone help me please

    Hello

    I don't think that oraext:query-database() can insert data into the table.

    What are your needs?
    Can not you plan to use the DB adapter with the insert operation?

    Kind regards
    Neeraj Sehgal

  • Insert data into another database with a script

    Hello.

    What is the best way to insert data into one database with a script

    INSERT INTO BF_PRUEBASMTP.bf_mtp_agr_inscription (ain_agreementid, ain_customerid, ain_paymethodsid, ain_servicemoduleid, referencia)

    SELECT AAG. AAG_AGREEMENTID, ACU. ACU_CUSTOMERID, 2, 2, ins. NUMERO_REFERENCIA

    OF BF_PRUEBASMTP.bf_mtp_agr_biller ABI

    JOIN IN-HOUSE

    BF_PRUEBASMTP. BF_MTP_AGR_AGREEMENT AAG ON ABI. ABI_BILLERID = AAG. AAG_BILLERID

    INNER JOIN 'CLIENTEUNICO. ALMUERZO" ins

    ON THE AAG. AAG_AGREEMENTID = ins. CONVENIOID

    INNER JOIN BF_PRUEBASMTP.bf_mtp_agr_customer ACU

    ON ACU.acu_typedocumentid = ins. TIPO_DOCUMENTO

    AND ACU.acu_numberid = ins. NUMERO_DOCUMENTO;

    CLIENTEUNICO. INSCRIPCIONES = SELECT * DE INSCRIPCIONES - to a DIFFERENT DATABASE


    Thank you very much.

    2931095 wrote:

    If I don't have permissions to create a database link. Is there another way to do this?

    Thank you.

    link to database IS the method by which an Oracle database accesses to a different database.

    If you are the ADMINISTRATOR, you should have permission.

    If you are not the ADMINISTRATOR, you should not have permission and need to talk to the ADMINISTRATOR that is allowed.

  • What trigger to use to insert data into the table db forms

    Hello

    My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
    I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
    Is - shutter release key of the form-level validation?

    Please notify.

    Thank you
    Didi.

    You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.

    Hi didi.
    And this is my last post I'll sleep. ;)
    Take form level trigger named preform
    and write on it

    :SYSTEM.MESSAGE_LEVEL := 5;
    

    I hope this works...

    Hamid

    Mark correct/good to help others to get the right answers. *

  • How to insert data into the BLOB column

    Hi all

    Can someone help me to insert data in the BLOB data type column?

    The structure of the table is
    CREATE TABLE XXATFL_DM_FORCAST_STG
    (
    TASK_ID NUMBER,
    USER_ID NUMBER,
    CREATED_BY NUMBER (15),
    CREATION_DATE DATE,
    LAST_UPDATED_BY NUMBER (15),
    DATE OF LAST_UPDATE_DATE,
    LAST_UPDATE_LOGIN NUMBER (15),
    RECORD_STATUS VARCHAR2 (1 BYTE),
    ERROR_MESSAGE VARCHAR2 (4000 BYTE),
    DATA_FILE BLOB
    )

    I want to insert data into the column DATA_FILE. and this insert statement inside a procedure.

    Please help me as soon as possible because it is very urgent for me

    Thank you and best regards,
    Charrier

    Charrier,

    If you form the string yourself, you can use the function utl_raw.cast_to_raw on your channel.

    http://download.Oracle.com/docs/CD/B12037_01/AppDev.101/b10802/u_raw.htm#997086

    sql> create table t(
      2    id number,
      3    l_blob blob
      4  );
    
    sql> insert into t values(1, utl_raw.cast_to_raw('SampleString'));
    
    1 row created.
    
    sql> commit;
    
    Commit complete.
    
  • How can I insert image into the image in adobe first pro cc 2015

    How can I insert image into the image in adobe first pro cc 2015. I want to put a fixed image on a video sequence as a pip.

    1 import the photo into your project (CTL-I or just drag & drop in the project Panel)

    2 dag photo imported on your timeline in a track located above the video you already have.

    3. click the clip of the photo in the timeline panel and then click on the control panel of the effect of the Source Panel tab.

    4. here you can resize, move, and even rotate the picture of the "query" fixed effect.  You can use the sliders or click on the area next to the word "Query" and use your mouse to do everything from the program Panel.

    Good luck and have fun.  BTW: once you get it you like, you can even animate the PIP to fly in or any other movement, you can think of with keyframes.

  • How can I insert html into the Actions Panel to format text?

    I am trying to create text using html, so I could format it in html.  I created a text box, it has given an instance name, "Dynamic text" selected and clicked 'display the text in html format.  When I click F9 (go on the Panel shares) to insert my html code, I get the message "current selection cannot have actions applied to it.  Am I missing something?  How can I insert html into the Actions Panel to format text?

    In order to assign html text to a textfield, you must assign your htmlText of a textfield property.  If you must give a name of uinstance to the textfield and then assign the text.  If you named the "tField" textfield, in the scenario that contains the textfield you EF text html as follows...

    tField.htmlText ="

    your text

    ";

    You should watch the TextFields htmlText property in the help documents to determine the limited number of html tags that are supported by Flash.

Maybe you are looking for

  • 15 - ak011na: Sound

    I have a problem with the sound burst that is slight discrepancy or skip it happens at random times do you have a clue as to why this happens its so boring. I also have this problem in HP lounge

  • Re: 46TL968G - Youtube has disappeared

    When I tried to open my YouTube app in Toshiba Places today, I couldn't find it - he has simply disappeared.Haven't tried resetting my TV, then do an update, still no YouTube. Anyone with the same problems? Is this permanent?

  • Not sure of the correct driver to install,

    I ran the Trouble Shooter and came up with: Keyboard filter does not have a driver The odd pat's case of extension of the Trouble Shooting Report, it's what is displayed: So I took a peek in the Reliability Monitor and it recicevd a warning. Driver m

  • Best laptop Dell for Photoshop CS6

    Hi all I'm a photographer and I'm looking for a Dell laptop that will work well with Photoshop CS6. It seems that Photoshop will not support a screen high ground for Windows so I have to stay at a size of 1920 x 1080 (max). I would like to get someth

  • Slow file - still not resolved

    Is there something wrong with the Explorer in Win7 Pro x 64 I have on my desk. When I opened a big folder full of media files: 1. it normally opens first 2. If I click on a file windows explored hangs for 20-30 seconds. If I continue to search, explo