Jump to content

Form Code


ShoeLace1291

Recommended Posts

I can't figure out why this isn't working.  It displays everything up until the submit button and I don't know why it doesn't display it.  I'm not getting any errors.  This is my code:

if(!$_POST['submit']){
echo "<table align='center' cellspacing='1' cellpadding='1' border='0'>
	 		 <tr>
			 	 <td align='center' colspan='2'><b>My Image Portfolio</b></td>
			</tr><tr><form action='userpanel.php?mng=myportfolio' method='POST'>";

	$query = mysql_query("SELECT sid,session,filename,userID,piecename,is_private,in_portfolio FROM recent_files WHERE userID = '$uid'") or die("Error: ".mysql_error());

		   while($fetch=mysql_fetch_array($query)){
		   
		   		$filename=$fetch["filename"];
				$piecename=$fetch["piecename"];
				$is_private=$fetch["is_private"];
				$in_portfolio=$fetch["in_portfolio"];

				echo "<td><a href='image.php?img=$filename'><img src='uploads/$filename' alt='$filename' border='0' width='75' height='75'></a></td>
					 		 </tr><tr>
					<td>Name:<br><input type='text' name='piecename' value='$piecename'></td>
							</tr><tr>
					<td>Display in Portfolio? <input type='checkbox' value='1' name='in_portfolio'></td>
							</tr><tr>";


			}

echo "<td align='center' colspan='2><input type='submit' name='submit' value='Submit Changes'></td>
	 	  </tr></form>
		 </table>";

	} 

 

Thanks for any help.

Link to comment
https://forums.phpfreaks.com/topic/62155-form-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.