ShoeLace1291 Posted July 28, 2007 Share Posted July 28, 2007 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 More sharing options...
ss32 Posted July 28, 2007 Share Posted July 28, 2007 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 https://forums.phpfreaks.com/topic/62155-form-code/#findComment-309441 Share on other sites More sharing options...
ShoeLace1291 Posted July 29, 2007 Author Share Posted July 29, 2007 Wow, I can't believe I didn't catch that. Well thanks. Lol. Link to comment https://forums.phpfreaks.com/topic/62155-form-code/#findComment-309896 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.