Hi all,

i m having a problem with inserting data in oracle db.
When i use form action =(call self page) then data is inserting properly.But problem with when using form action=(Another_page).data is not insering into database.For ur kind infromation i m using oracle db and php for my application.

sample code:

Code: ( text )
<form action="welcome.php" method="post">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>


pls can any one help me.

Thanks

Recommended Answers

All 3 Replies

Member Avatar for langsor

I've never touched Oracle so I hope it's not related to that...

So you're saying that the same form on two different pages -- one works, one doesn't?

Can you show us both forms, to compare? There must be some difference there.

Of are you submitting to two different PHP files under <form action="" ...>, in which case please show us the two PHP files in question.

Thanks.

hi,

Thanks for ur reply.

actually, This is not a problem with oracle.
i have two pages.One is test.php, another is called welcome.php and i have a table in db.Now what i want to do is, test.page will take input from user and when submit button willbe pressed, data willbe submitted into table and link will go to the another page (welcome.php) to show a success massege.
Thats why i used <form action =welcome.php method="post" name="abc"> inthat case the link goto page welcome.php but data is not insered. Other case if i use <form action="<?=$HTTP_SERVER_VARS?>" NAME="abc" method="post"> then data is inserted.but link does not go to next page.

So what i can i do now?
pls help me.

Thanks

after your insert query...put this line:
header(welcome.php);
then after data insertion to your table,than page will redirect to welcome.php

your form can be like this:
<form action="" NAME="abc" method="post">

but put your insert query and header in this condition:

if($_SERVER['REQUEST_METHOD']=='POST')
{
//insert queries...
header(welcome.php);
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.