PHP remember Form-button data to insert into form field

Hi,
I am creating a book website where people can reserve books (one at a time).
Basically what I want to do is have a reserve button under each book which contains hidden values (the title and author of the book) and when they click on the button they will be taken to a 'reserve book' page with a form on it where they will have to fill out their details. However I want the book title and author to automatically be entered into the appropriate fields, so to save the users from having to do it themselves.
I'm sure this is possible with PHP, but not sure how to go about it in the right way.
I would appreciate any help with this.
Thanks

Thanks for that, however I can't seem to get the first part of the code right. I have the following:
Reserve book button:
               <form action="reserve.php" method="post">
                    <input type="hidden" name="bookName" id="bookName" value="Eclipse" />
                    <input type="hidden" name="author" id="author" value="Stephenie Meyer" />
                    <input class="button" type="image" value="send" alt="reserve" src="images/reserve.gif" width="81" height="22"/>
                </form>
Reserve book form:
   <form action="process-form.php" method="post">
              <label for="name">Your Full Name:*</label>
             <input type="text" name="name" id="name" />
              <label for="telephone">Tel no:*</label>
              <input type="text" name="telephone" id="telephone"  />
              <label for="email">Email:*</label>
              <input type="text" name="email" id="email"/>
              <label for="Title">Book Title:*</label>
              <input type="text" name="book_title" size="25" value="<?php echo $bookName ?>" />
              <label for="Author">Author:*</label>
              <input type="text" name="author" size="25" value="<?php echo $author ?>" />
              <input class="button" type="image" value="send" alt="reserve" src="images/reserve.gif" width="81" height="22"/>         
            </form>

Similar Messages

  • Data type mismatch when inserting into text field

    Hello all,
    Using VB script and ASP.
    I have a page that inserts into a field (casenum) in a table (clientsw) in a database. The field (casenum) in the table is data type TEXT :
    I create a recordset and then an insert statement which the following is part of:
    Code to insert the casenum into the field
    rsClients("Casenum")=Right(Date(),2) & "E-100" & rsCasenumber("countervalue")
    It inserts a number like 09E-1004500
    I then have code that takes that string and passes it to the next page as a variable
    Session("UserID")=rsClients("CASENUM")
    response.redirect "done3.asp"
    When it gets to the next page it is assigned as UserID
    Dim svuserid
    svuserid = "0"
    if (Session("UserID") <> "") then svuserid = Session("UserID")
    %>
    My information inserts into the database exactly as I want it, but when it gets to the next page I get an error that is displayed that says the following:
    Microsoft JET Database Engine error '80040e07'
    Data type mismatch in criteria expression.
    /done3.asp, line 16
    My code on the second page is as follows:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/connNewdatabase1.asp" -->
    <%
    Dim svuserid
    svuserid = "0"
    if (Session("UserID") <> "") then svuserid = Session("UserID")
    %>
    <%
    set rsClients = Server.CreateObject("ADODB.Recordset")
    rsClients.ActiveConnection = MM_connNewdatabase_STRING
    rsClients.Source = "SELECT *  FROM CLIENTSW WHERE CASENUM=" + Replace(svuserid, "'", "''") + "  ORDER BY CASENUM"
    rsClients.CursorType = 0
    rsClients.CursorLocation = 2
    rsClients.LockType = 3
    rsClients.Open()
    rsClients_numRows = 0
    %>
    Line 16 is the one that says rsClients.Open()
    If I take the concatenation out of rsClients("Casenum")=Right(Date(),2) & "E-100" & rsCasenumber("countervalue") and have only rsClients("Casenum")=rsCasenumber("countervalue") and change the table field to number, I don't get the "datatype mismatch error"
    What do I change to enable me to leave the above statement concatenated and insert into the table correctly and complete the stuff on the next page?

    >This is an access database, varchar is not an option for a datatype.
    Sorry. In another thread I thought you mentioned using SQL Server
    >I changed the + signed to ampersands instead and it doesn't make a difference.
    I didn't think that was the problem. I was just pointing out that it's a bad practice. If you use the '+' on two strings that can evaluate as numeric, it will actually add rather than concat them.

  • I am creating a request for proposal form and I need to add a commission structure field.  I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?

      I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?

    It sounds like what you are trying to do is edit the choices in a likert field to something other than the default radio button. This is not something that you can do in Formscentral at this time.
    Andrew

  • Noob help to format date to insert into mysql

    Sorry, if this question has been asked before, I did di a search but could not find an answer that I could understand.  I am pretty new to DW and my coding skills are not good so please go easy on me.
    I have a simple form to insert records to a mysql database.  I have created a form validarion behaviour to require the fields that are set as not-NULL in the database.  How do I modify the code to allow the date format to be entered in the dob field in the form as DD/MM/YYYY but inserted correctly in the database as YYYY/MM/DD?
    Finally, how would I then modify it further to default to todays date?
    Here's my code:
    <?php require_once('Connections/mypms.php'); ?>
    <?php
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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 demographics (title, firstname, surname, dob, address1, address2, town, county, postcode) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['title'], "text"),
                           GetSQLValueString($_POST['firstname'], "text"),
                           GetSQLValueString($_POST['surname'], "text"),
                           GetSQLValueString($_POST['dob'], "date"),
                           GetSQLValueString($_POST['address1'], "text"),
                           GetSQLValueString($_POST['address2'], "text"),
                           GetSQLValueString($_POST['town'], "text"),
                           GetSQLValueString($_POST['county'], "text"),
                           GetSQLValueString($_POST['postcode'], "text"));
      mysql_select_db($database_mypms, $mypms);
      $Result1 = mysql_query($insertSQL, $mypms) or die(mysql_error());
    $recordID = mysql_insert_id();
      $insertGoTo = "detail_tab.php?recordID=$recordID";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
      exit();
    $colname_insert = "1";
    if (isset($_GET['recordID'])) {
      $colname_insert = (get_magic_quotes_gpc()) ? $_GET['recordID'] : addslashes($_GET['recordID']);
    mysql_select_db($database_mypms, $mypms);
    $query_insert = sprintf("SELECT px_id, title, firstname, surname, dob, address1, address2, town, county, postcode FROM demographics WHERE px_id = %s", $colname_insert);
    $insert = mysql_query($query_insert, $mypms) or die(mysql_error());
    $row_insert = mysql_fetch_assoc($insert);
    $totalRows_insert = mysql_num_rows($insert);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>address</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    //-->
    </script>
    </head>
    <body>
    <p> </p>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" onSubmit="MM_validateForm('firstname','','R','surname','','R','dob','','R');return document.MM_returnValue">
      <table align="center">
        <tr valign="baseline">
          <td nowrap align="right">Title:</td>
          <td><input type="text" name="title" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Firstname:</td>
          <td><input type="text" name="firstname" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Surname:</td>
          <td><input type="text" name="surname" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Dob:</td>
          <td><input type="text" name="dob" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Address1:</td>
          <td><input type="text" name="address1" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Address2:</td>
          <td><input type="text" name="address2" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Town:</td>
          <td><input type="text" name="town" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">County:</td>
          <td><input type="text" name="county" value="" size="32"></td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Postcode:</td>
          <td><input type="text" name="postcode" value="" size="32"></td>
          <td><input name="Search" type="button" id="Search" value="Search"></td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right"> </td>
          <td><input type="submit" value="Insert record"></td>
          <td> </td>
        </tr>
      </table>
      <input type="hidden" name="MM_insert" value="form1">
    </form>
    <p> </p>
    </body>
    </html>
    <?php
    mysql_free_result($insert);
    ?>
    Thank you for your help :-)

    barrydocks wrote:
    thanks for the reply osgood;
    I was hoping for a more simple solution than a JQuery date picker, I have read this threat where the SQL queries is aletered:
    http://forums.adobe.com/thread/450108
    Which I tried but could not make work.
    I haven't tried DATE_FORMAT but the example implies that it would work when SELECTING the date from the database to output to a page in a more conventional FORMAT. However you want to INSERT the date using the correct format.
    barrydocks wrote:
    http://forums.adobe.com/thread/1097555
    but I don't know how to use this in my code that already has form validation?
    That thread is implying that you would need to convert the date inserted into the form field before it is inserted into the database in the correct format.......so you may as well use a datepicker.
    Problem with letting anyone insert a date manually is that a date can be written in many formats which are NOT acceptable by the database. A datepicker overcomes all of these issues. Getting the date back out of the database is a case of simply converting via php into a format which is applicable to your country or your usage OR using the method in the first thread you provided.
    Lets see if anyone else can offer a more simple solution for you.

  • Best Practice to fetch SQL Server data and Insert into Oracle Tables

    Hello,
    I want to read sqlserver data everry half an hour and write into oracle tables ( in two different databases). What is the best practice for doing this?
    We do not have any database dblinks from oracle to sqlserver and vice versa.
    Any help is highly appreciable?
    Thanks

    Well, that's easy:
    use a TimerTask to do the following every half an hour:
    - open a connection to sql server
    - open two connections to the oracle databases
    - for each row you read from the sql server, do the inserts into the oracle databases
    - commit
    - close all connections

  • Parse xml data and insert into database

    Hi Friends,
    I have an xml document which needs to be parsed and the data need to be inserted into an oracle database table.
    Please tell me which will be the easiest and optimal way of doing this.
    Thanks,
    Achayan

    Take a look at the JDOM xml parsing library - google for JDOM download or something.
    This will allow you to build an object representation of the XML doc, from which you can then extract the data.
    J

  • Split data and insert into different rows

    I have a string like 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi,"
    I have created a single column table
    I have to extract data from first untill comma(,) occurs and insert into the table like the following
    sfdsdf
    sfdsf
    sfsd
    qweqeqw
    iuoi
    Please help me how to do it

    Or a Single SQL query
    SELECT trim(',' from DECODE(ROWNUM,1,SUBSTR(STR,1,INSTR(STR,',',1)),
                                        LENGTH(STR)-LENGTH(REPLACE(STR,','))+1,SUBSTR(STR,INSTR(STR,',',-1,1)),
                                         SUBSTR(STR,INSTR(STR,',',1,ROWNUM-1), INSTR(STR,',',1,ROWNUM)-INSTR(STR,',',1,ROWNUM-1))
                                   ))  STR1
                     FROM (SELECT 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi' STR FROM DUAL),ALL_TABLES
                     WHERE ROWNUM <= LENGTH(STR)-LENGTH(REPLACE(STR,','))+1
                      ORDER BY ROWNUM

  • Using select query to insert into a field

    Hi,
    I am working with a jdbc-to-jdbc scenario, in which on source side iam geting data from 2 tables t1 & t2 and inserting this data into two tables tb1 & tb2 on target side.A field in tb2 has to be inserted with a value which is equal to the number of records inserted into the table tb1 i.e with the number equal to 'how many records from the table t1 has been retrieved inorder to insert into table tb1'.
    Can anybody please suggest me.....
    Thanks & Regards,
    Radhika.

    consider ur strucutre
    <Data>
    <id> 1 </id> 0..1
    <id> 2 </id>
    <id> 3 </id>
    <id> 4 </id>
    </Data>
    here i meant context to <id>. Mapping id > count > target will give the nunmber of records in Data i.e. 4
    note: here u have change the context of <id> to <data>
    Message was edited by:
            Prabhu  S

  • Today's date dynamically entered into text field that user enters additional text into same field.

    Trying to have today's date dynamically entered into a repeating table row textfield when the button is clicked to create each repeating row. The user can then enter addtional text into the same text field next to the date.
    Example:
    [4/25/2012] This is the text the user entered.
    Today's date is populated in each update row created when the "Update Row" button is clicked.
    The following script works but only for the first instance, not the second, third, forth, etc...
    Click event: (JavaScript, client)
    this.resolveNode('Table2._RowB').addInstance(1);
    xfa.resolveNode("Table2.RowB.#subform.Update").rawValue
    Thank you,
    ~Don

    Hi Don,
    Does this solution cover the above problem? https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw
    Niall

  • How can i make it where if data is entered into a field it is mirrored to another field within the document?

    I do not want them named the same as I don't want the second one appearing until after it is entered into the first field.

    Hi,
    If the form fields have the same name then the data entered in one field will be auto populated in other with the same name. For example, if there is a form field named custom field 1 in one document and there is another field with the same name(custom field 1) in the other document and you upload them together into a single transaction and send the document, then the data entered in custom field 1 in one document will be auto populated in custom field 1 of other document as well. This also applies for one document only as well.
    Does this help?

  • Insert into a field which is long

    i use stream method to insert into a
    long type field , but unsuccess.
    my code is:
    PreparedStatement pstmt = conn.prepareStatement("insert into forlong(thelob) values(?)");
    InputStream is = new FileInputStream ("c:\\notes.txt");
    File file = new File ("c:\\notes.txt");
    pstmt.setAsciiStream (1, is, (int)file.length ());
    is.close();

    I do not have TOAD, but I tried your posted example from PL/SQL Developer and it seems to work as expected. Can you post some more detail as to how you are doing it from TOAD and what the issue is, with errors, if any:
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    Connected as kkishore
    SQL>
    Table created
    View created
    Trigger created
    1 row inserted
            F1
             1
             1
    OWNER                          TABLE_NAME                     COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    KKISHORE                       DUMMY_V                        F1                             NO        NO         NO
    SQL>

  • Using numberd buttons to enter text into a field

    Hi all, was wondering if I had 10 seperate sprites acting as
    buttons on a page, which will be numbered 0 -9, is it possible to
    use them to enter text into a field. e.g.
    If the user presses the sprite with a number 1 on it, would
    it be possible to have a 1 displayed in an edit field. I need to
    pretend as though im using a remote.
    thanks

    You can create a behavior that will allow you to set a
    variable for each
    button. When you assign the behavior to your button sprite,
    it'll
    prompt you to enter the ButtonNumber property. Haven't tested
    this yet,
    but something like this should work:
    global gNumberEntered
    property ButtonNumber
    on getPropertyDescriptionList
    description = [:]
    addprop description, #ButtonNumber, [#comment:"Enter number
    to assign
    to this button", #format:#integer, #range:[1,10], #default:
    1]
    return description
    end getPropertyDescriptionList
    on mouseup
    sprite(the currentSpriteNum).member = member("buttonOver")
    gNumberEntered = ButtonNumber
    cursor -1
    end
    on mouseEnter me
    sprite(the currentSpriteNum).member = member("buttonOver")
    cursor 280
    end
    on mouseDown me
    sprite(the currentSpriteNum).member = member("buttonDown")
    end
    on mouseLeave me
    sprite(the currentSpriteNum).member = member("buttonUp")
    cursor -1
    end

  • Combining Date and Time into 1 Field

    Post Author: Marc Vaccarino
    CA Forum: Formula
    Hi,
    I'm trying to write a formula to combine 2 fields (date and time) into one. I would like it to look like this.
    2/12/2007 + 12:00pm = 2/12/2007 12:00pm
    Thanks,

    Post Author: Marc Vaccarino
    CA Forum: Formula
    Thanks that worked but my problem is currently the date field I'm using has a date and time (12/12/2007 12:00am) and the time field has it as well  (12/12/2007 1:45am).  I've been going into crystal and clicked on format field and just showing the date and in the time field, just showing time. Then I would extract the report to excel then run another formula to get it to work. I'm looking to automate it a little. Any ideas??

  • Read XML data and Insert into SQL Database

    Hi Everybody,
    i am new to Oracle SOA.
    Can anybody help me out to how to insert xml data into sql server using BPEL and JDeveloper (with clear steps).
    thanks in advance
    Vishnu Kumar

    Hi Peter,
    you are right,at high level i was able to figure at these things.
    But i don't know how to implement it using jdeveloper.
    It will be more helpful if you can give me detailed steps to do it.
    Thanks
    Vishnu Kumar

  • Data not inserted into database from jsf..

    hello..
    m developing ma project with 2 separate module-EJB and WEB .in which web module contains JSF managed bean and jsf-jsp pages.
    my application is running well.bt didn't give output to the database for inserting data.
    m giving ma simple test application ...plz tell me whr m going wrong.
    //Emp.java---entity file in ejb module
    package entity;
    import java.io.Serializable;
    import javax.persistence.Basic;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    @Entity
    @Table(name = "emp")
    @NamedQueries({
        @NamedQuery(name = "Emp.findAll", query = "SELECT e FROM Emp e"),
        @NamedQuery(name = "Emp.findByName", query = "SELECT e FROM Emp e WHERE e.name = :name"),
        @NamedQuery(name = "Emp.findByAddress", query = "SELECT e FROM Emp e WHERE e.address = :address")})
    public class Emp implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @Column(name = "name")
        private String name;
        @Column(name = "address")
        private String address;
        public Emp() {
        public Emp(String name) {
            this.name = name;
        public Emp(String name, String address) {
            this.name = name;
            this.address = address;
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
        public String getAddress() {
            return address;
        public void setAddress(String address) {
            this.address = address;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (name != null ? name.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Emp)) {
                return false;
            Emp other = (Emp) object;
            if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "entity.Emp[name=" + name + "]";
    //empsession.java--session file in ejb module
    package session;
    import entity.*;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless
    public class empsession implements empsessionRemote {
        @PersistenceContext(unitName = "EJBmodulePU")
        private EntityManager em;
        public void addemp(String name, String address) {
            Emp objemp=new Emp(name,address);
            em.persist(objemp);
    //empsessionRemote.java--remote file for sessionbean
    package session;
    import javax.ejb.Remote;
    @Remote
    public interface empsessionRemote {
        void addemp(String name, String address); 
    //empMB.java--managed bean file in web module
    package mbean;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.RequestScoped;
    import javax.naming.InitialContext;
    import session.empsessionRemote;
    @ManagedBean(name="empMB")
    @RequestScoped
    public class empMB {
        private String name;
        private String address;
        public String getAddress() {
            return address;
        public void setAddress(String address) {
            this.address = address;
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
        /** Creates a new instance of empMB */
        public empMB() {
        public void empadd()
            try
            InitialContext ic = new InitialContext();
            empsessionRemote esr=(empsessionRemote)ic.lookup(empsessionRemote.class.getName());
            esr.addemp(name, address);
            catch(Exception ex)
    }//AddEmp.jsp --jsf page in web module
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>JSP Page</title>
    </head>
    <body>
    name:
    <h:inputText id="txt1" value="#{empMB.name}"></h:inputText>
    address:
    <h:inputText id="txt2" value="#{empMB.address}"></h:inputText>
    <h:commandButton id="btnadd" value="submit" action="#{empMB.empadd}"></h:commandButton>
    <h1><h:outputText value="Hello World!"/></h1>
    </body>
    </html>
    </f:view>
    //faces-config.xml
    <faces-config version="2.0"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
    <managed-bean>
    <managed-bean-name>empMB</managed-bean-name>
    <managed-bean-class>mbean.empMB</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/AddEmp.jsp</from-view-id>
    <navigation-case>
    <from-outcome>AddEmp</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    m using toplink provider and mysql db
    wating for positive reply..
    thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I think this question would be more appropriate in a forum devoted to database or JPA topics.

Maybe you are looking for

  • Problem with ApEx after upgrade of database to 10.2.0.2

    I could have posted this in the general Database forum since I am not sure whether the problem is directly related to the HTMLDB installation, perhaps it's only the place where the symptoms are shown, but here is it. One of the customers I am current

  • Help sending a Magic Packet through to WOL

    I'm trying to set up my Airport Extreme to send a magic packet through. It successfully wakes up my computer if I do it immediately after it goes to sleep, but if I try after its been asleep a few hours it doesn't work. I would think it may be a comp

  • Secondary cost element table

    Hi All, We recently configured a new company code and I want to take out all the list of secondary cost elements which we used during testing for this company code. Which table should I use and how can I do that? Please assist. Thansks in advance

  • How to stop tumbler from generating thumbnailers for pdf file

    I'm using tumbler for thunar to generate thumbnailers, which works quite well. But I don't want it to generate pdf thumbnailers, since they are not in the same size. I've searched much, but not found any config file for tumbler. Any ideas? Thanks.

  • First and last post

    I am posting today from my Android phone because my emails to Blackberry and RIM went unanswered. As a 6 year Blackberry user and a recent purchaser of a playbook I wanted to know when Verizon would be getting an updated Blackberry handset. I got no