RE: [PHP] Quickform - edit form
| From: | Chris W. Parker | Date: | Wed, 09 Mar 2005 21:56:15 +0000 |
| Subject: | RE: [PHP] Quickform - edit form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-210373@lists.php.net to get a copy of this message | ||
Leonie (phpgroup) <mailto:leonie@mungbeans.com.au>
on Wednesday, March 09, 2005 1:13 PM said:
> I've set up a form using Quickform. I've got it working a dream. My
> problem is at the moment it only adds records to the database. I would
> like to also have an edit form. I don't know what is easiest. Amend
> the existing form so it enters data and edits it, or have two
> different webpages.
I would use the same page. Have the page determine whether or not the
page is being used to add an entry or to edit an entry. Then act
accordingly.
> Also I'm having trouble working out how to assign data to the form.
> Can anyone point me to an example?
Without some code my response is going to be sarcastic.
DID YOU TRY THIS??
<?php
echo "<input type=\"text\" value=\"$yourVariable\" />\n";
?>
Look! I just assigned data to the form!
Chris.