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

retriving info from a database and print it ind a form???

P: n/a
i have a page where info can be inserted in a form that consists of some
textarea and some textfield.

but when i get to the page, i want the last inserted info, which is saved in
a database, to be retrived and be displayet ind the 6 text field/area??? can
that be done?

the user can then edit some of the text and leave some of it unedited.....

can it be done??


Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <40*********************@dread12.news.tele.dk>, "jeghers"
<sadkas> says...
i have a page where info can be inserted in a form that consists of some
textarea and some textfield.

but when i get to the page, i want the last inserted info, which is saved in
a database, to be retrived and be displayet ind the 6 text field/area??? can
that be done?

the user can then edit some of the text and leave some of it unedited.....

can it be done??


Yes. Do you actually have server-side JavaScript capability? If not,
you need to think about using something like Perl, PHP, or ASP to get at
the information in the database.

Whatever the case, you haven't given enough information here. What
server? What scripting language? What database?

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
Jul 23 '05 #2

P: n/a
On Sun, 2 May 2004 14:37:57 +0200, in comp.lang.javascript "jeghers"
<sadkas> wrote:
| i have a page where info can be inserted in a form that consists of some
| textarea and some textfield.
|
| but when i get to the page, i want the last inserted info, which is saved in
| a database, to be retrived and be displayet ind the 6 text field/area??? can
| that be done?
|
| the user can then edit some of the text and leave some of it unedited.....
|
| can it be done??


This can be achieved in the sql statements. To retrieve the last
record inserted then you would need to use something like:
rs.Source = "SELECT * from myTable order by fieldName DESC LIMIT 1";
rs.Open();

Your html page would set the default values according to the record
i.e.
<input type="text" value="<%=rs.Fields.Item("field1").value%>" />

<textarea .... ><%=rs.Fields.Item("field2").value%></textarea>
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.