473,508 Members | 2,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php sticky forms

Hello,
Ok, i'm missing something probably very simple. I want to have some
forms that are sticky, a user fills one out then is given a personalized
thank you message on the next page and the Email is mailed to an admin, or
any fields marked as required are indicated and the user must fill out that
information. This should retain the previously entered correct data and the
user need not press the back button.
Thanks.
Dave.
Jul 17 '05 #1
5 8728
I noticed that Message-ID: <tg*************@fe2.columbus.rr.com> from
dave contained the following:
Ok, i'm missing something probably very simple. I want to have some
forms that are sticky, a user fills one out then is given a personalized
thank you message on the next page and the Email is mailed to an admin, or
any fields marked as required are indicated and the user must fill out that
information. This should retain the previously entered correct data and the
user need not press the back button.


I have one that does that.

http://www.ckdog.co.uk/php/form.zip

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
*** dave wrote/escribió (Wed, 03 Mar 2004 01:10:49 GMT):
Ok, i'm missing something probably very simple. I want to have some
forms that are sticky, a user fills one out then is given a personalized
thank you message on the next page and the Email is mailed to an admin, or
any fields marked as required are indicated and the user must fill out that
information. This should retain the previously entered correct data and the
user need not press the back button.


Just loop through the very same page until form is correctly filled:
if form is ok
redirect to thank page
else
print form

Form could look this way:

<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<input type="text" name="foo" value="<?=addslashes($_POST['foo'])?>">
</form>

--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #3
Alvaro G Vicario wrote:
(...)
Form could look this way:

<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<input type="text" name="foo" value="<?=addslashes($_POST['foo'])?>">
</form>


Shouldn't it be <?=strip_tags($_POST['foo'])?>?

Or, better:
<?=htmlentities( stripslashes($_POST['foo']) )?>

addslashes() is only if You're passing the form content to a database
and can be rather annoying otherwise ;-)

Rudi
Jul 17 '05 #4
Hello,
Thanks to everyone who offered suggestions, i got my sticky form.
Dave.
Jul 17 '05 #5
*** Rudolf Horbas wrote/escribió (Wed, 03 Mar 2004 19:07:09 +0100):
Shouldn't it be <?=strip_tags($_POST['foo'])?>?
What's wrong with using < and > inside quotes:

<input type="text" value="Hello <World>!">
<?=htmlentities( stripslashes($_POST['foo']) )?>

addslashes() is only if You're passing the form content to a database
and can be rather annoying otherwise ;-)


You're right, I made a big typo :)
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2219
by: deko | last post by:
RE: "Object Invalid or No Longer Set" errors I've had an angelic visitation and the revelation is that my problem, in essence, is due to the fact that I have multiple forms open at the same time...
5
1347
by: mabond | last post by:
Hi all This question is one of "theory" rather than a search for the specifics of a solution. I need some pointers as to how to proceed with my project. Here goes. My application allows the...
4
2983
by: dac | last post by:
I am quietly going insane on this project. I've never worked on a project like this one before. All my previous sticky forms were for data entry, not editing. I don't know how to display the form...
2
1997
by: sojo | last post by:
As a web designer with only very rudimentary php skills, I've looked all over for a user friendly php form processor that includes sticky fields. The best match for my needs, php form wizard...
3
4562
by: cheapterp | last post by:
Hey Guys, I have just started working on ColdFusion, so I am relatively new to it than most of you may be. I am trying to create 'Sticky Stay-Filled' forms so that when the form is submitted, the...
9
2761
by: student4lifer | last post by:
Hello, could someone show me how to make sticky form with dynamically generated form element? for example, if one likes to make the dynamically generated check box (and its name) 'sticky' that...
12
5447
by: manuitpro | last post by:
I am trying to make drop down stick in my php. Below is my code, can some one help me to make it sticky. I am tried and lost. I have two dropdown in the form, each pulls data from mysql with...
0
7333
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,...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5637
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
5057
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
4716
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
3208
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...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
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 ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.