473,469 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

display thank you message in original form page

5 New Member
Hi forum

I'm totally new to php and mySQL so please excuse my ignorance. I've been trying to research this but because I'm not totally sure what I'm searching for I haven't yet found a solution.

Essentially I have a form that posts data (name, number, recommended friend, recommended email). This data is then inserted into a table and a "Thank you for your recommendation" message is echoed. So far so good.

But currently the message is displayed on the process page. What I would like is to display the thank you message in the original page, within the original form #div and perhaps display the data that was submitted as confirmation.

I'd appreciate any guidance on how to go about this.

Thanks in advance.
Dec 3 '06 #1
3 3569
michaelb
534 Recognized Expert Contributor
This is not so much about PHP, what you asking looks more like a general question on web design.

I think it boils down to the following:
You still need to submit the input data to the backend, before you display the "thank you" note.
(There is a way to avoid it, but IMHO this would be an inferior design)
One way to stay in the current page and still submit the data is to use IFRAME.
The question to ask is what it would give you that you would not get otherwise?
With your current schema all you need is available to you and you can display the submitted data on the same page where you display the "thank you" message.
This allows to keep your design consize and not to get into potential problems with different browsers when dealing with IFRAME, dynamic html and other things you may have to employ if you proceed with idea of staying on the same page.
Dec 3 '06 #2
ronverdonk
4,258 Recognized Expert Specialist
In other words: when you combine the 2 scripts (the form and the db update) into one page, you can extend the db update part with the thank you message. This setup also allows you to check any fields, the user has entered, for validity, and re-display the form when an error is encountered,
A simple setup is:
Expand|Select|Wrap|Line Numbers
  1. if form=submitted
  2. do;
  3.   check validity
  4.   update database
  5.   issue thank you message
  6.   exit;
  7. if errors found
  8.   display errors
  9. endDo;  
  10. re-)display form
  11. enter data
  12. submit form
Ronald :cool:
Dec 3 '06 #3
spaghetti
5 New Member
Thanks for your input - I think I've got a clearer picture now. I'll see if I can get this to work.

I only thought it was possible because I have a 3rd party form that displays a message after the user updates their profile. But I couldn't work out how it was implemented and didn't trust myself not to break it!

Thanks for your guidance.
Dec 3 '06 #4

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

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
6
by: HartSA | last post by:
Here is the relevent part of my code. I am trying to learn ASP. <body> <table border="0" cellspacing="0" cellpadding="0"> <form name="frmSearch1a" method="get"> <tr> <td align=center>...
6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
3
by: jm | last post by:
Sometimes when creating a new page on pastback, IE 6 does not display the page. View Source reveals code is being sent, the right code, but for whatever reason, IE 6 does not display it. It is...
13
by: KMiller | last post by:
I would like to control entry into one or more of the tabs > I have set up on my Tab control based on set rules. Does > anyone know how to grey-out the text so that a user will > see that they do...
7
by: | last post by:
I'm using ASP.NET 2.0, C#, SQL Server 2005, and databound controls like the DataList and the GridView. Right now I'm using SqlDataSource as part of very quick and dirty site; I'm not looking to...
11
by: nickyeng | last post by:
I have a html file contains a form asking user to select a choice and press enter to pass the data to server. In server there, i have a cgi script(C language) that accepts the input from browser...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
1
by: William Gill | last post by:
I hope I can state this clearly enough. I am redoing some of my html(php) forms. I'm trying to break things into three functions on a self processing php page: 1) show the form (and populate...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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 ...

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.