Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


yogita
Action tag
1 Answer(s)      5 years and 7 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

January 5, 2009 at 6:44 AM


Hi yogita,


I am sending data insert action code.

<?

include "con1.php";



session_start();





$transfer=$_POST["transfer"];

$accountno=$_POST["accountno"];



$accountholder=$_POST["accountholder"];

$bankname=$_POST["bankname"];

$branchaddress=$_POST["branchaddress"];



$bankcity=$_POST["bankcity"];

$bankcountry=$_POST["bankcountry"];



$accounttype=$_POST["accounttype"];



$firstname = $_SESSION["firstname"];





$lastname = $_SESSION["lastname"];

$companyname = $_SESSION["companyname"];



$address = $_SESSION["address"];

$pincode = $_SESSION["pincode"];

$city = $_SESSION["city"];

$country = $_SESSION["country"];

$phoneno = $_SESSION["phoneno"];

$mobileno = $_SESSION["mobileno"];





#Connect to MySql Server

$link = mysql_connect($host_db,$user_db,$password_db) or die ("couldnot connect: ".mysql_error());



#Select the database

mysql_select_db($database_db, $link) or exit('Error Selecting database: '.mysql_error());





$result = mysql_query("select max(id) as max from register", $link) or exit('$sql failed: '.mysql_error());



$row1 = mysql_fetch_array($result);



$tempserno=$row1["max"];





$id=$tempserno+1;





$inserSql="insert into register(id,firstname,lastname,companyname,address,pincode,city,country,phoneno,mobileno,transfer,accountno,accountholder,bankname,branchaddress,bankcity,bankcountry,accounttype ) values('$id','$firstname','$lastname','$companyname','$address','$pincode','$city','$country','$phoneno','$mobileno','$transfer','$accountno','$accountholder','$bankname','$branchaddress','$bankcity','$bankcountry','$accounttype')";



mysql_query($inserSql, $link) or exit('$sql failed: '.mysql_error());



header("Location: success.php");



exit;

?>


----------------------------------------------------------------

Thanks.

Amardeep


Related Tutorials/Questions & Answers:
JSP Action Tag
JSP Action Tag   Defined JSP Action Tag ?   Action tag... JSP action tags to either link to a Java Bean set its properties, or get its properties. syntax of Action Tag : <jsp:action attributes /> The most
action tag - Struts
action tag  Is possible to add parameters to a struts 2 action tag? And how can I get them in an Action Class. I mean: xx.jsp Thank you
Advertisements
jsp forward action tag
jsp forward action tag  Defined jsp forward action tag ?   The <jsp:forward> element forwards the request object containing... application context as the forwarding JSP file. Syntax of forward action Tag: <
jsp include action tag
jsp include action tag  Defined jsp include action tag ?   ... that is included in the JSP page. When the include action is finished, the JSP container continues processing the remainder of the JSP file. syntax of include action
Action tag - JSP-Servlet
Action tag  Hello, I want to help ....i hav one feedback form there is action , .. can i use two action at the same form because i want html page on submitting feedback form and instead of above tag i change form
attribute in action tag - Java Beginners
attribute in action tag  I'm just a beginner to struts. The name tag(name="bookListForm") is used to define the form used with the action class. But i`m not clear about the attribute tag(attribute
Struts2.2.1 Action Tag Example
Struts2.2.1 Action Tag Example The Action tag  is used to call action... the action name and an optional namespace.The body content of the tag is used to render... the Action tag in the Struts2.2.1 -- First we create a JSP file named
Struts 2 Action Tag
Struts 2 Action Tag "action" Tag in Struts 2 is used by developer to call action class from a JSP page. For calling the action class, developer must assign action name. Struts 2 Action Tag is one of the Data Tags, which are used
Action Tag (Data Tag) Example
Action Tag (Data Tag) Example       In this section, we are going to describe the action tag. The action tag is a generic tag that is used to call actions directly from a JSP page by specifying the action
Action Submit Html
in the action setting of the <form> tag. Understand with Example The Tutorial... Action Submit Html       Action Submit in Html is used to submit a form, When a user
no action mapped for action - Struts
no action mapped for action  Hi, I am new to struts. I followed...: There is no Action mapped for action name HelloWorld
JSF actionListener Tag
JSF actionListener Tag          This tag is used to add a action listener to the component associated with the enclosing tag. When user does an event
JSP Forward action
JSP Forward action  Jsp forward action tag examples
Jsp Action Tags
Jsp Action Tags  how can i use jsp forward action tag?i want examples
Action and ActionSupport
Action and ActionSupport  Difference between Action and ActionSupport.... The developer implements this interface of accessing string field in action... for implements Action and some other interfaces and provides some feature like data
Action form
Action form  how to store details from user and how to create asp file or etc
UISlider action
UISlider action  Hi, How to capture and use UISlider action? Thanks   Hi, Following code might helpful. -(IBAction)changeSlider:(id)sender { NSString *value= [[NSString alloc] initWithFormat:@" Value %d
Tomahawk navigationMenuItem tag
of the commandButton tag is used to assign an action listener method from...Tomahawk navigationMenuItem tag          This tag is used
Action Listeners
Action Listeners  Please, could someone help me with how to use action listeners I am creating a gui with four buttons. I will like to know how to apply the action listener to these four buttons.   Hello Friend, Try
standard action - JSP-Servlet
; hi friend.. Action Allow you to specify components from a tag library or a standard tag. For Example : Action may display an output or write some value to servlet without showing any output. Actually action is a tag name and tag
jsp:include action tag
jsp:include action tag In this section we will discuss about JSP "include" action tag. The jsp "include" tag is used to include the resource at the request time. It is better for dynamic web page. The include tag
Struts Action Chaining
Struts Action Chaining  Struts Action Chaining
Action Configuration - Struts
Action Configuration  I need a code for struts action configuration in XML
the Action Mapping specified
the Action Mapping specified  How is the Action Mapping specified
What is Action Class?
What is Action Class?  What is Action Class? Explain with Example
ActionMapping and is the Action Mapping specified
ActionMapping and is the Action Mapping specified  What is ActionMapping and is the Action Mapping specified
Struts Action Class
Struts Action Class  What happens if we do not write execute() in Action class
Action without a form.
Action without a form.  Can I have an Action without a form
Action Or DispatchAction - Development process
Action Or DispatchAction   Hi, Action class has execute() only where as dispatchaction class has multiple methods. plz tell me when to use action and dispatchaction.can we use multiple actions in Action class. Thanks Prakash
RADIO FROM JSP TO ACTION.
RADIO FROM JSP TO ACTION.  Hi frds, how to get the selected multiple radio button values from jsp to action
Struts Action Classes
Struts Action Classes  1) Is necessary to create an ActionForm to LookupDispatchAction. If not the program will not executed. 2) What is the beauty of Mapping Dispatch Action
Calling Action on form load - Struts
. Even if you want to use the tag with a simple Action that does not require input...Calling Action on form load  Hi all, is it possible to call... this list is coming from the action which i m calling before the page is being
Action classes in struts
Action classes in struts  how many type action classes are there in struts   Hi Friend, There are 8 types of Action classes: 1.ForwardAction class 2.DispatchAction class 3.IncludeAction class 4.LookUpDispatchAction
uibarbuttonitem initwithcustomview action
uibarbuttonitem initwithcustomview action  HI, Can anyone provide me the code for uibarbuttonitem initwithcustomview action? In my application I am adding custom BarButtonItem, how I can attach an action to it? Thanks
Login Action Class - Struts
Login Action Class  Hi Any one can you please give me example of Struts How Login Action Class Communicate with i-batis
action Servlet - Struts
action Servlet  What is the difference between ActionServlet ans normal servlet? And why actionServlet is required
servlet action not available - Struts
servlet action not available  hi i am new to struts and i am getting the error "servlet action not available".why it is displaying this error. Struts Blank Application action org.apache.struts.action.ActionServlet
DTO & Action class - Struts
DTO & Action class  Hi I am really new to struts2. I just wanted to know that if I have a DTO and an action class, how do I put the form data into the DTO? Can someone please explain with a simple example
Action and AbstractAction
to implement action listeners that can be shared and coordinated. Actions can... actionPerformed to specify what you want the Action to do. See examples below... if this Action is enabled.  act.setEnabled(boolean enabled) Sets
Dispatch Action - Struts
Dispatch Action  While I am working with Structs Dispatch Action . I am getting the following error. Request does not contain handler parameter named 'function'. This may be caused by whitespace in the label text
UIButton action example
UIButton action example  HI, How i can capture the Button click action? What to write the .h and .m file? Thanks   Hi, Here is the code that you can write in .h file: (void) buttonPress:(id)sender; Here
Action Listener Review
Action Listener Review Many components call an action listener in response to a user action (JButton, JMenuItem, JTextField, etc). An action... ways to implement action listeners follow. 1. One shared action listener
HTML Action attribute - Java Beginners
are calling servlet from action tag,then you need to import the package...HTML Action attribute  I have folder structure like... -emp_event.java In emp_event.jsp I have form tag in jsp file as below
uinavigationcontroller back button action
. Give me any code for uinavigationcontroller back button action method. Thanks
Struts dispatch action - Struts
Struts dispatch action  i am using dispatch action. i send the parameter="addUserAction" as querystring.ex: at this time it working fine. but now my problem is i want to send another value as querystring for example
getting db in action class
getting db in action class  hi, Am usin struts in ma application... n i need to interact with the db .. so i used.. getDataSource(request) but it gives me an error.. java.lang.NoSuchMethodError: LoginAction.getDataSource(Ljavax
No action instance for path
No action instance for path  <%@ taglib uri="http...; <body bgcolor="white"> <html:form action="/FileUploadAndSave...; </form-beans> <action-mappings> <action path
Standard Action "jsp:param"
process the parameter. This tag can be enclose in any other action tags...Standard Action <jsp:param> In this Section, we will discuss about "jsp:param" standard action & their utilization with a example
Is Multiple Actions in Action class - Struts
Is Multiple Actions in Action class  In ActionClass we can use only one action i.e execute(), but in DispatchAction we can use multiple actions.My question is , we can use multiple actions in Action class if(action.equals("add
Understanding Struts Action Class
code under the <action-mappings> tag is used to for mapping... Understanding Struts Action Class       In this lesson I will show you how to use Struts Action
 

 

 

DMCA.com