Jump to content

Undefined index


bravo14

Recommended Posts

Hi guys

 

I am getting an error of

Notice: Undefined index: photo_filename in /home/sites/haldonguesthouse.co.uk/public_html/new-site/admin/upload.php on line 28

 

I understand that the error would suggest that the field is not referenced on the form that is used to post the values through.

 

Below is the form code that is used to post the values

<form id="add_gallery" action="upload.php" method="post">
<table>
<tr>
<td>Gallery Name</td>
<td><select name="category" id="category">
<option>Please select...</option>
<option value="14">Superior Double Room</option><option value="15">Superior Single Room</option><option value="16">Double en-suite</option><option value="17">Twin or Triple Room, en suite</option><option value="18">Family Room for 4</option><option value="19">Single Room with Private Facilities</option><option value="20">Double Room with Private Facilities</option><option value="21">The Gallery</option></select></td>
</tr>
<tr>
<td>
     Photo 1:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 2:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 3:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 4:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 5:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 6:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 7:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 8:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 9:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td>
     Photo 10:
    <input name='photo_filename[]' type='file' />
</td>
</tr>
<tr>
<td>
     Title:
    <input name='photo_caption[]' type="text" size="30">
</td>
</tr><tr>
<td></td><td><input type="submit" name="submit" value="Upload Photos"/></td>
</tr>
</table>
</form>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.