![]() |
| ||
| how to access the database within same jsp page Hi , i have some elements in one form(sample.jsp).I want to insert that fields into database.But i know abt, the insertion of form values in to the database using next page(next page contains database connection) .But i don't know how do write the database connection within the same page(sample.jsp). Anyone can you help me Thank you |
| ||
| Re: how to access the database within same jsp page Quote:
|
| ||
| Re: how to access the database within same jsp page you could also break the page into two pages.Basically, you could have the page call itself. Like if you wanted to insert username and password into your database, you could do this (this is just sample code)if (theQueryNotComplete){ Do the code for the 1st logical page. With the two elements on them.}else{ And have the info past to the database. now process info and place output.}Now in the if part, place a form/anchor that will point to the same page, this way the info is past to the current page, and it seems as if the page has gone to another, however it really stays on the same page.Even with this it may not seem as practical as above because it will still load, the other alternative is learning AJAX. |
| ||
| Re: how to access the database within same jsp page Quote:
Please tell me how to do it in two pages. I use JSP,PHP and mysql. Thanks, Looking forward to your reply.' |
| ||
| Re: how to access the database within same jsp page Quote:
PS: Solution to original post is useless... |
| ||
| Re: how to access the database within same jsp page please give me the code for the same Thank you. |
| ||
| Re: how to access the database within same jsp page please find a book to learn that or can start reading following topics http://java.sun.com/docs/books/tutor...iew/index.html http://javaboutique.internet.com/tutorials/JSP/ and you can search on google for more Do not expect that somebody will give you code without any input from you... |
| All times are GMT -4. The time now is 12:19 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC