Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2006, 08:01 PM
Registered User
 
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Chamaeleon
Default Update db showing data in form

Hey everyone!

I created a form that put news (title, abstract, text, etc.) data in mysql db: This data is going to show up in a news section of the site. This was relativetly simple and I done it and it works!

I also would like to have the oportunity to update the news. So the title, abstract, etc apears in the right "boxes" of the form (the same as the previous or equal to it) and I would update (make changes/corrections) and then by submiting, the previous data would be replaced by this new one.

Here is the question:
How do I make the title, abstract and text apear in their own boxes so that I do not have to write everything all over again?

Thanks in advance!
Cheers
Chamaeleon

Just like the edit option in this forum!!
 
Old January 26th, 2006, 11:12 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1.Access your database
2.Recall the right data
3.fill the html field with the data

I guess you know how 1 and 2 works.
3)
<input type='text' name='user_age' size="4" value="<?php echo $age; ?>">
 
Old January 26th, 2006, 05:55 PM
Registered User
 
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Chamaeleon
Default

Thanks Mantis.
I'm going to try it!

Cheers
Chamaeleon






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to update data to DB from data set umank.88 ADO.NET 1 May 7th, 2008 10:07 PM
Compare Form Data against varchar DB record. iloveoatmeal Classic ASP Databases 16 July 2nd, 2007 01:40 PM
submit data to db with html form....(help) PeterJB Beginning PHP 2 August 6th, 2006 12:07 AM
ASP form to email & update Access db seala Classic ASP Basics 3 July 22nd, 2003 01:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.