on my image hosting, the users can create/edit captions to the images.. right now its not working, but its probably something simple..
heres what i got.
<?
if($mode == "update_caption") {
$sql = "UPDATE image SET image_caption='$image_caption' WHERE image_member_id = '$session_member_id' and image_status = 'A' ORDER BY image_id";
$result = mysql_query($sql);
}
?>
<form name="home" method="post">
<input type="hidden" name="list_num" value="<?php print($rows); ?>">
<table cellpadding="0" cellspacing="0">
<?php if($data->image_caption == "") { ?>
<tr>
<td align="right"><font face="verdana" size="1">caption: </font></td>
<td colspan="2"><font face="verdana" size="1"><input type="text" name="image_caption" class="form" style="width: 200px;" value="<?php print($data->image_caption); ?>">
<a href="javascript:jp_caption();"><img src="./images/bu.update.gif" border="0"></a></font></td>
</tr>
<?php } else { ?>
<tr>
<td align="right"><font face="verdana" size="1">caption: </font></td>
<td colspan="2"><font face="verdana" size="1"><input type="text" name="image_caption" class="form" style="width: 200px;" value="<?php print($data->image_caption); ?>">
<a href="javascript:jp_caption();"><img src="./images/bu.update.gif" border="0"></a></font></td>
</tr>
<?php } ?>
any ideas?
heres my database table as well..
image_id, image_name, image_original, image_ext, image_size, image_width, image_height, image_caption, image_member_id, image_status, created_on, updated_on, album_picture