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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


yogita
Action tag
1 Answer(s)      6 years 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
Tomahawk navigationMenuItem tag
of the commandButton tag is used to assign an action listener method from...Tomahawk navigationMenuItem tag          This tag is used
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
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
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
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
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
Advertisements
 

 

 

DMCA.com