Forum Moderators: coopster
<div align='center'>-Add a new image</div>
<form action='add_image_fns.php' method='post' enctype='multipart/form-data' name='imageform'>
<div align='center'>
<table width='50%' border='0' cellspacing='0' cellpadding='0' class='body'>
<tr>
<td></td>
<td> </td>
</tr>
<tr>
<td width='41%'>Image Name:</td>
<td width='59%'><input name='imgname' type='text' id='imgname' style='border:1px solid #ffffff; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: verdana; BACKGROUND-COLOR: #4069b2;'>
</td>
</tr>
<tr>
<td height='48'>Image Keywords:<br />
(seperate by commas<br />
ie: word,next word,next)<br />Minimum 1 keyword</td>
<td><textarea name='keywords' id='keywords' style='border:1px solid #ffffff; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: verdana; BACKGROUND-COLOR: #4069b2;'></textarea>
</td>
</tr>
<tr>
<td>Image:</td>
<td><input name='image' type='file' id='image' style='border:1px solid #ffffff; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: verdana; BACKGROUND-COLOR: #4069b2;'></td>
</tr>
<tr>
<td>Is the Image for Adults 18+ years of age?</td>
<td><input type='radio' name='18plus' value='yes' style='border:1px solid #ffffff; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: verdana; BACKGROUND-COLOR: #4069b2;'>
Yes
<input name='18plus' type='radio' value='no' style='border:1px solid #ffffff; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: verdana; BACKGROUND-COLOR: #4069b2;'>
No</td>
</tr>
<tr>
<td> </td>
<td><input type='submit' name='Submit' value='upload' id='upload' style='border:1px solid #ffffff; FONT-SIZE: 10px; COLOR: #ffffff; FONT-FAMILY: verdana; BACKGROUND-COLOR: #4069b2;'></td>
</tr>
</table>
</div>
</form>";
and then this is the top of the FNS file.
<?php
if (empty($_POST['imgname'])) $errormess .= "Image Name<br>";
if (empty($_POST['keywords'])) $errormess .= "Keywords<br>";
if (empty($_POST['18plus'])) $errormess .= "Adult image<br>";
if (empty($_POST['image'])) $errormess .= "No Image Selected<br>";
if ($errorness!= " ")
{
echo "<div align=center><b>You left out some parts:</b><br>",$errormess,"<br><a href=\"javascript:history.back(1);\" class=\"links\">Back Add/Edit Image<a/></div>";
exit;
}
The error is that it comes back as:
You left out some parts:
No Image Selected
thanks,
Mike
The $_POST['image'] should be $_FILES['image'].
Check out this post by birdman:
[webmasterworld.com...]
msg #29
dc