How to submit data to mysqldb and to another from form submi

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shilpitha
Forum Newbie
Posts: 2
Joined: Tue Feb 24, 2009 7:20 am

How to submit data to mysqldb and to another from form submi

Post by shilpitha »

How to submit data to mysqldb and to another from form submit?

Please give me example.
In PHP
From a Form two inputs with submit button.
After submit it must insert those data to mysql database and must be the target form must use those same variable values using post.
For inserting the data to mysql database must not be written in the target form. In middle can use any calling form.

You must understand the above scenario.

Thanks
Its urgent for me Please do help on this
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: How to submit data to mysqldb and to another from form submi

Post by susrisha »

Well this is what i understand from what you said.
1. you have a form that takes two inputs
2. The data once submitted must be inserted into a database.
Here are the things which are unclear..

3. This data is to be accessible by another target form??

If this is the case, use the variables that you got posted from the previous form

3. The data to be submitted to another form which has someother execution..
You have to use curl execution for this i think..

Just let us know the other part (after inserting into mysql )
shilpitha
Forum Newbie
Posts: 2
Joined: Tue Feb 24, 2009 7:20 am

Re: How to submit data to mysqldb and to another from form submi

Post by shilpitha »

1 Step is fine - > Form with two inputs. one submit form. enter --> one.page -action="two.page"
2 nd is fine --> then insert data to mysql. using function or any other way.
3 rd The new page must use the variables values.(Insertion to db function will be not be written in this new page).two.page
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: How to submit data to mysqldb and to another from form submi

Post by susrisha »

okay.. u need to use $_SESSION variables to access the variables in the third page.

Try and read in the lines of $_SESSION implementation.

else post the code here and will be able to assist you..
http://www.php.net/session
Post Reply