By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,190 Members | 1,653 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,190 IT Pros & Developers. It's quick & easy.

loosing date in HTML form

P: n/a
hello,
as always i have a problem:-)

i'm using HTML form. User is adding some date to this form and after
that i'm generating plot. When plot is generated i can see en empty form
and a plot. I want to see filled in form and a plot. don't know why i'm
loosing all the data.

when user adds data to the form i'm doing something like that:

...index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).

waiting for somebody to solve my problem.
Jul 17 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Piotr Wolski wrote:
hello,
as always i have a problem:-)

i'm using HTML form. User is adding some date to this form and after
that i'm generating plot. When plot is generated i can see en empty form
and a plot. I want to see filled in form and a plot. don't know why i'm
loosing all the data.

when user adds data to the form i'm doing something like that:

...index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).

waiting for somebody to solve my problem.


When you output the form, set the value of the form element (eg text
box) to hold the value of operation.
Jul 17 '05 #2

P: n/a
Piotr Wolski schrieb:
when user adds data to the form i'm doing something like that:

..index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).


...index.php?operation=added..

if $_GET['operation']=='added' then blablabla..

(of course its pseudocode).

BTW, you're not "loosing" the data, you're "losing" it.

Regards,
Matthias
Jul 17 '05 #3

P: n/a
Piotr Wolski wrote:
i'm using HTML form. User is adding some date to this form and after
that i'm generating plot. When plot is generated i can see en empty form
and a plot. I want to see filled in form and a plot. don't know why i'm
loosing all the data.

when user adds data to the form i'm doing something like that:

..index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).

waiting for somebody to solve my problem.


HTML
========
....
<form ...>
<input ... value="<?php echo $value_entered_before; ?>">
<!-- with a bit of PHP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :) -->
....
</form>
....
========

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #4

P: n/a
Matthias Esken wrote:
Piotr Wolski schrieb:

when user adds data to the form i'm doing something like that:

..index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).

..index.php?operation=added..

if $_GET['operation']=='added' then blablabla..

(of course its pseudocode).

BTW, you're not "loosing" the data, you're "losing" it.

Regards,
Matthias

sorry for my english..
apologise to me cause till now i'm in usa about two weeks and i'm
learning english...my homecountry is Poland..

Jul 17 '05 #5

P: n/a
Andy Barfield wrote:
Piotr Wolski wrote:
hello,
as always i have a problem:-)

i'm using HTML form. User is adding some date to this form and after
that i'm generating plot. When plot is generated i can see en empty
form and a plot. I want to see filled in form and a plot. don't know
why i'm loosing all the data.

when user adds data to the form i'm doing something like that:

...index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).

waiting for somebody to solve my problem.

When you output the form, set the value of the form element (eg text
box) to hold the value of operation.


could you please explain it to me??
could you give me a simple example?
Jul 17 '05 #6

P: n/a
"Piotr Wolski" <wo****@cs.purdue.edu> wrote in message
news:cd**********@mozo.cc.purdue.edu...
Matthias Esken wrote:
Piotr Wolski schrieb:

when user adds data to the form i'm doing something like that:

..index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).

..index.php?operation=added..

if $_GET['operation']=='added' then blablabla..

(of course its pseudocode).

BTW, you're not "loosing" the data, you're "losing" it.

Regards,
Matthias

sorry for my english..
apologise to me cause till now i'm in usa about two weeks and i'm
learning english...my homecountry is Poland..


Co, pracujesz tu na czarno jako pragramista PHP? :-)

Jak czesto sie zdarza w tym newsgroupie, ten pan nawet nie przeczytal twoja
wiadomosci, zanim zasugerowal cos, ktore nie ma zadnego zwiazku z twoim
problemem. Po co rade komus dawac, skoro nie ma ochoty tym pomagac? No,
rozumiem wiecej o PHP niz zachowaniu ludzi...

A teraz wyjasnienie. Po tym jak uzytkownik zsubmitowal formularz, to, dla
przegladarki, juz zupelnie nowa strona. Wiec nie utrzymywa danych
wprowadzonych wczesniej. Sam muszisz wypelniac ten formularz. Np

<input type="text" name="liczba_dup" value="<?=$_REQUEST['liczba_dup']?>">

Mam nadzieje ze to jest do rozumu. Polski oczywiscie nie jest moj jezyk
rodzinny.
Jul 17 '05 #7

P: n/a
Chung Leong wrote:
"Piotr Wolski" <wo****@cs.purdue.edu> wrote in message
news:cd**********@mozo.cc.purdue.edu...
Matthias Esken wrote:
Piotr Wolski schrieb:

when user adds data to the form i'm doing something like that:

..index.php?operation=added..

if operation=="added" then blablabla..

(of course its pseudocode).
..index.php?operation=added..

if $_GET['operation']=='added' then blablabla..

(of course its pseudocode).

BTW, you're not "loosing" the data, you're "losing" it.

Regards,
Matthias


sorry for my english..
apologise to me cause till now i'm in usa about two weeks and i'm
learning english...my homecountry is Poland..

Co, pracujesz tu na czarno jako pragramista PHP? :-)

Jak czesto sie zdarza w tym newsgroupie, ten pan nawet nie przeczytal twoja
wiadomosci, zanim zasugerowal cos, ktore nie ma zadnego zwiazku z twoim
problemem. Po co rade komus dawac, skoro nie ma ochoty tym pomagac? No,
rozumiem wiecej o PHP niz zachowaniu ludzi...

A teraz wyjasnienie. Po tym jak uzytkownik zsubmitowal formularz, to, dla
przegladarki, juz zupelnie nowa strona. Wiec nie utrzymywa danych
wprowadzonych wczesniej. Sam muszisz wypelniac ten formularz. Np

<input type="text" name="liczba_dup" value="<?=$_REQUEST['liczba_dup']?>">

Mam nadzieje ze to jest do rozumu. Polski oczywiscie nie jest moj jezyk
rodzinny.

robie pewien projekt tutaj. nie nie pracuje na czarno:) przyjechalem tu
na wakacje i wszystko jest zalatwione legalnie..

zadzialalo to z $_REQUEST...

jedyny problem jest gdy <input type="file" ..<--wtedy nie uzupelnia mi
formularza..musze wartosc ktora uzytkownik wybierza zczytac z tego pola
i dopiero zapamietac/ masz jakis pomysl?

btw. skad jestes ze znasz jezyk polski?

pozdrawiam, Piotrek
Jul 17 '05 #8

P: n/a
"Piotr Wolski" <wo****@cs.purdue.edu> wrote in message
news:cd**********@mozo.cc.purdue.edu...
Matthias Esken wrote:
Piotr Wolski schrieb:
BTW, you're not "loosing" the data, you're "losing" it.

Regards,
Matthias

sorry for my english..
apologise to me cause till now i'm in usa about two weeks and i'm
learning english...my homecountry is Poland..


Why would someone need to apologize for teaching you something in a fairly
polite way? Would you prefer to continue using incorrect English?

- Virgil
Jul 17 '05 #9

P: n/a
Virgil Green wrote:
"Piotr Wolski" <wo****@cs.purdue.edu> wrote in message
news:cd**********@mozo.cc.purdue.edu...
Matthias Esken wrote:
Piotr Wolski schrieb:
BTW, you're not "loosing" the data, you're "losing" it.

Regards,
Matthias


sorry for my english..
apologise to me cause till now i'm in usa about two weeks and i'm
learning english...my homecountry is Poland..

Why would someone need to apologize for teaching you something in a fairly
polite way? Would you prefer to continue using incorrect English?

- Virgil

is this PHP group or what??

virgil: ok you don't have to apologise..
Jul 17 '05 #10

P: n/a
"Piotr Wolski" <wo****@cs.purdue.edu> wrote in message
news:cd**********@mozo.cc.purdue.edu...
jedyny problem jest gdy <input type="file" ..<--wtedy nie uzupelnia mi
formularza..musze wartosc ktora uzytkownik wybierza zczytac z tego pola
i dopiero zapamietac/ masz jakis pomysl?
Hmmm. To nie jest mozliwe ze wzgledu na bezpieczenstwo. I nie ma sensu
ponownie przesylac plik, bo masz juz. Mozesz robic cos w rodzaju

<div id="filename">
<?=$filename?>
<input type="button" value="Change..."
onclick="document.getElementById('filename').style .display = 'none';
document.getElementById('upload').style.display =
'inline'" </div>
<input type="file" name="upload" id="upload"
style="display: none">

Uzytkownik widzi nazwe pliku co przeslano. A jesli chce przesylac inny plik,
klikuje na "Change" i dostaje pole typu file, ktora przed tym jest
niewidzialna.
btw. skad jestes ze znasz jezyk polski?


Studiowalem polonistyke na uniwersytecie (to jest w Stanach). Niestety,
wiedza o polsce w ogole nie oplaca. Wiec pracuje jako pragramista.
Jul 17 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.