SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    ? big bad opus's Avatar
    Join Date
    Jun 2001
    Location
    DC
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using form to update database

    i'm trying to write my own script and to make a long story short i need I don't know how to create a form that will post to a mysql database.

    i also need an example of how to make a form that will let me edit the database fields.

    the form should look something like

    Code:
    <form method="post" name="form1" action="????">
    		<INPUT NAME="id" TYPE=Hidden Value="0000" Size="">
    		<INPUT NAME="date" TYPE=Hidden Value=" " Size="">
    		<INPUT NAME="add" TYPE=Hidden Value="yes" Size="">
    		<font face="Arial, Helvetica, sans-serif">Subject: 
    		<input type="text" name="songtitle">
             by: 
            <input type="text" name="artist"><br>
             REVIEW:<br>
            <textarea name="review" rows=5 cols=75></textarea><br>
            </form>

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    To learn how to create form, try
    http://www.cgi101.com/class/

    When you press a submit button (which you don't have in your form here, and say if you let action="./path/ok.php"), it will execute ok.php, and ok.php is the one that will add, delete, select whatever from the database.

    John

  3. #3
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This very lengthy tutorial covers everything you are wanting to do:

    http://www.webmasterbase.com/article.php/228


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •