I am trying to find out how i would include the option to upload a picture as part of a form.

i need help with the following:

1. how to add picture upload to form

2. how to store image in folder with the location stored in the database.

3. how to retrieve image

4. how to insert current date into database in 17/01/10 (UK format)

<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
        <table align="center">
          <tr valign="baseline">
            <td align="right" valign="top" nowrap>Title:</td>
            <td align="left" valign="top"><input type="text" name="title" value="" size="32"> 
              <span class="admin_list">MAX 35 Characters </span></td>
          <tr valign="baseline">
            <td nowrap align="right" valign="top">Full Story:</td>
            <td align="left" valign="top"><textarea name="story" cols="80" rows="5"></textarea>
          <tr valign="baseline">
            <td nowrap align="right" valign="top">Summary:</td>
            <td align="left" valign="top"><textarea name="summary" cols="80" rows="2"></textarea>
          <tr valign="baseline">
            <td align="right" valign="top" nowrap>Link:</td>
            <td align="left" valign="top"><input type="text" name="link" size="32"> 
              <span class="admin_list">use www. format </span></td>
          <tr valign="baseline">
            <td align="right" valign="top" nowrap>Image:</td>
            <td align="left" valign="top"><input type="text" name="image" size="32"></td>
          <tr valign="baseline">
            <td align="right" valign="top" nowrap>Date:</td>
            <td align="left" valign="top"><input type="text" name="date" value="" size="32"> 
              <span class="admin_list">Date Format 00/00/00</span> </td>
          <tr valign="baseline">
            <td align="right" valign="top" nowrap>&nbsp;</td>
            <td align="left" valign="top"><input type="submit" value="Add News Story"></td>
        <input type="hidden" name="story_no" value="">
        <input type="hidden" name="MM_insert" value="form1">

Wow. One problem at a time there.

First learn how to upload files with some basic html forms, look here:

Then follow up on this tutorial that's actually for image uploads

One thing you'll notice in both tutorials is the use of:


..in the form tag, which your above code does not include. When uploading data files, that code snippet is necessary for correct operation.

If you are not familiar with PHP it would help to read about it

If you've never written code of this sort before, I suggest that you start with a small html form, and not what you have going on above.

Good luck.