473,938 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with page redirect and data insertion together

45 New Member
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:
Expand|Select|Wrap|Line Numbers
  1. <form action="welcome.php" method="post">
  2. Name: <input type="text" name="name" />
  3. Age: <input type="text" name="age" />
  4. <input type="submit" />
  5. </form>
pls can any one help me.

Thanks
Aug 13 '08 #1
18 2802
r035198x
13,262 MVP
In which page is the code that inserts the values in the database? That's the one you have to call if you want the values to be inserted.
Aug 13 '08 #2
boss1
45 New Member
hi,
Thanks for reply.

My fisrt page is "test.php" from where i m trying to insert data
After press on submit button form data will store in db and a success massege will show on the "wlcome.php"pag e.
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body><form action="welcome.php" method="post">
  3. Name: <input type="text" name="name" />
  4. Age: <input type="text" name="age" />
  5. <input type="submit" />
  6. </form></body>
  7. </html> 
so pls help me how to divert the page to "wlcome.php " as well as data will insert in to db.

Thanks
Aug 13 '08 #3
r035198x
13,262 MVP
header ?
Aug 13 '08 #4
boss1
45 New Member
hi,
Thanks for ur cooperation.

it willbe help for me if u make it clear in my given example for how to use "header"to redirect the page into welcome.php.

thanks again
Aug 13 '08 #5
boss1
45 New Member
hei,

i need ur help wthh my specified problem previously disscussed.

it's urgent for me so, pls help me.

Thanks
Aug 14 '08 #6
boss1
45 New Member
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:

Expand|Select|Wrap|Line Numbers
  1. <form action="welcome.php" method="post">
  2. Name: <input type="text" name="name" />
  3. Age: <input type="text" name="age" />
  4. <input type="submit" />
  5. </form>
the above code not data inserting but page is redirecting.

so how to insert data aswell as redirect the page in welcome.php ?
pls can any one help me.

Thanks
Aug 16 '08 #7
Markus
6,050 Recognized Expert Expert
Show the code you use to insert on welcome.php
Aug 16 '08 #8
samikhan83
33 New Member
hi......
1. U R getting some error ...... for page not found.... if yes write the proper action for form...

2. check weather ur getting all ur required data for ur query...... by echoing or printing the data.....

3. check ur query with the database...

4. using PHP_SELF is better than using form action.....

5. if none of the above then paste ur code.....
Aug 16 '08 #9
Atli
5,058 Recognized Expert Expert
4. using PHP_SELF is better than using form action.....
That would depend on what you are attempting to do. What is "better" will always depend on the circumstance.
Not to mention that even if you use PHP_SELF, you are still using the form action ;)

But, to the OP's problem.
Whether or not you are posting the data to the current page or any other page, it shouldn't make the slightest difference. Any decent browser should simply fuse the POST data into the request before sending it.

I would bet the problem would be in your server-side script, the one that is meant to process the data into whatever database you are using.

Show us that code please, and we will do what we can to help you figure out a solution.
Aug 17 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6019
by: Raju V.K | last post by:
I am developing a PHP-mysql database. It is noted that when the browser window is refreshed the data is inserted again in the database. unfortunately there is no unique keys that I can use to verify the existance of the data, so as to prevent the multiple insertion. Is there any other way to prevent it otherthan introducing another field for this purpose and verifying its existance? Regards,
1
1853
by: Ronan | last post by:
Hi, I have a problem with a form using the PHP PEAR HTML_QuickForm package & javascript: I want to record the content of my form into a mySQL database then execute a javascript function. My problem is that javascript is executed before the mySQL insertion. I actually need the mySQL insertion first, since my javascript function
5
6077
by: John N. | last post by:
Hi All, Here I have a linked list each containing a char and is double linked. Then I have a pointer to an item in that list which is the current insertion point. In this funtion, the user hits the right and left keys to move this insertion point (cursor) Here is the problem:
0
6319
by: mharris | last post by:
I need help with merging two Word documents into one through C# code. The problem isn't so much getting the documents put into one as it is maintaining the appropriate formatting, or rather reformating, after the merge. This is a full description of my needs. I have a C# class library that creates two Crystal Reports, and then exports them to the harddrive as Word documents. One's orientation is landscape, the other is portrait. I then...
0
1450
by: ScriptNFool | last post by:
Ok... I've mooched off this group for a while now. Time to give some code back. Here's a class I wrote to solve the problem of handling query strings. I use it for an application where the page needs to preserve the existing QueryString, but add or remove a couple items and then redirect it back to the same page or other locations. ....A good example of how polymorphism can be useful for us VB'ers who are less familiar with the...
3
2148
by: André | last post by:
Hi, I want to include a graphic made in file2 into file. File must first send a value to file2 (with Response.Redirect) which will be used for the graphic. My problem is that only the graphic is rendered and not the content of file1. Thanks for help. André
0
1382
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes tabpanels such as:Catalog,Terms,SiteMap.ViewCart ,etc. All the jewellery Intro is in the Catalog panel. when I first click the Catalog panel it Introduces me all the main types of the jewellery(It's all done dynamically from the cs file).The...
11
13029
by: gotonagle | last post by:
hi, can some help me in this regard i m entering some values in my databse from my asp page. for this i m using a submit button which submit the form to a new page that is 'insert.asp'. this page perform insertion and redirect it back to my previos page. can i not do this insertion on the same page? if i wirte insertin code on the same page it perform insertion for the page refresh also...thats why i m using another page(some people says...
2
2651
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to update the information which is stored in a SQL database. In testing we noticed that the form was updating correctly but the update mechanism was also updating the first record of the table in the sql database every time. No error messages are on...
0
11524
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10657
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9857
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7381
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4904
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3501
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.