troubleshooting Question

attach an image to a form

Avatar of Amanda Watson
Amanda WatsonFlag for Australia asked on
HTMLPHP
16 Comments1 Solution1196 ViewsLast Modified:
Hi,
I have a form that is submitted by php.

Code is attached

At the end of Buy Tickets I would like to add a field that says Attach Image, that allows a user to browse their hard drive to attach an image to the form for submission.

Can someone show me how to do this please?

Thanks
<form action='sendresults.php?action=insert' method='post'>
  <table border='1' align='center'>
    <tr>
      <th colspan='2'> <span class="style10">Submit a Listing</span> </th>
    </tr>
    <tr>
      <td><strong>Submitters Name:</strong></td>
      <td><input type='text' name='SubmittersName' size='72' id='submitter' /></td>
    </tr>
    <tr>
      <td><strong>Email: </strong></td>
      <td><input type='text' name='Email' size='72' id='email' /></td>
    </tr>
    <tr>
      <td><b>Event Type:</b> </td>
      <td><select name="NewEventType">
          <option selected >Auto </option>
        <option>Other </option>
      </select></td>
    </tr>
    <tr>
      <td><b>Location:</b> </td>
      <td><br />
        City:
        <input type='text' name='NewCity' id='City' />
        Country:
        <input type='text' name='NewCountry' id='Country' />
      </td>
    </tr>
    <tr>
      <td><b>Start Date (YYYY-MM-DD):</b> </td>
      <td><input type='text' name='StartDate' maxlength='10' id='StartDate' />
      </td>
    </tr>
    <tr>
      <td><b>End Date (YYYY-MM-DD):</b> </td>
      <td><input type='text' name='EndDate' maxlength='10' id='EndDate' />
      </td>
    </tr>
    <tr>
      <td><b>Title:</b> </td>
      <td><input type='text' name='Title' size='72' id='Title' />
      </td>
    </tr>
    <tr>
      <td><b>Description:</b> </td>
      <td><textarea name='Description' rows='5' cols='55' id='description'></textarea>
      </td>
    </tr>
    <tr>
      <td><b>Web Link:</b> </td>
      <td><input type='text' name='weblink' size='72' id='weblink' /></td>
    </tr>
    <tr>
      <td><b>Buy Tickets:</b> </td>
      <td><input type='text' name='buytickets' size='72' id='buytickets' /></td>
    </tr>
    <tr>
      <td colspan='2' align='center'><input type='submit' name='submit' value='Submit!' />
      </td>
    </tr>
  </table>
</form>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 16 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros