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
Share on other sites

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

 

should be

 

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

 

you left out a single quote

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.