CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Update data using form method

 



aiikahn
Novice

Nov 3, 2007, 9:28 AM

Post #1 of 4 (455 views)
Update data using form method Can't Post

Hi everyone...I was wondering if anyone could help with a quick issue. I'm still new in Perl and I'm trying to pull some data from a row of data. I finally figured out how to insert data into a database using the form method (via SQL) but I'm not quite sure how to pull data and display the data on a webform so the data can be updated manually. Can anyone help me? Pleaaase...=(

Thank you in advance


eWish
User

Nov 4, 2007, 6:39 PM

Post #2 of 4 (448 views)
Re: [aiikahn] Update data using form method [In reply to] Can't Post

Once you get your data from the db you can use the value attribute and assuming that your HTML is inside of your script.

Code
 <input type="text" name="fname" value="$datafromDB">

I don't know what db you are using so I can help you there.


aiikahn
Novice

Nov 6, 2007, 7:25 PM

Post #3 of 4 (441 views)
Re: [eWish] Update data using form method [In reply to] Can't Post

Thank you for your prompt response, eWish! But I tried that method but the when the form displays, its blank. Is there anything I'm doing wrong? Below is part of the script:

print qq(<form method="get" action="updateme.pl">);
print qq(<table width="59%" border="1" align="center">);
print qq(<tr><td width="31%">Last Name</td>);
print qq(<td width="69%"><input name="last" type="text" value="Last"></td></tr></form>);


eWish
User

Nov 6, 2007, 8:16 PM

Post #4 of 4 (437 views)
Re: [aiikahn] Update data using form method [In reply to] Can't Post

Your code worked for me. It have word "Last" in the field named 'last'.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives