I always like to start off with the coding I have so far:
http://aimmultimedia.com/memberseditimages.php (You can't see the table, since you're not logged in and you don't have any information stored.)
<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
$username = $userdata['user_name'];
$sql="SELECT * FROM registered_files WHERE owner = '$username'";
$result=mysql_query($sql);
// Define $color=1
$color="1";
$rows=mysql_fetch_array($result);
$rows['id'] = $id;
echo '<table width="900" border="1" align="center" cellpadding="2" cellspacing="0">';
while($rows=mysql_fetch_array($result)){
// If $color==1 table row color = #FFC600
if($color==1){
echo '<tr bgcolor="#eeeeee">
<td>'.$rows['status'].'</td><td>'.$rows['imagename'].'</td><td>'.$rows['date'].'</td><td>'.$rows['description'].'</td>
<td><a href="/memberseditimages.php?editid='.$id.'">Edit</a></td>
</tr>';
// Set $color==2, for switching to other color
$color="2";
}
// When $color not equal 1, use this table row color
else {
echo '<tr bgcolor="#c0c0c0">
<td>'.$rows['status'].'</td><td>'.$rows['imagename'].'</td><td>'.$rows['date'].'</td><td>'.$rows['description'].'</td>
<td><a href="/memberseditimages.php?editid='.$id.'">Edit</a></td>
</tr>';
// Set $color back to 1
$color="1";
}
}
echo '</table>';
require_once "side_right.php";
require_once "footer.php";
?>
</body>
</html>
I have that, and the 'edit' link points them to memberseditimages.php?editid=
Is there any way so that in the beginning of the script if there is a $_GET[anything] then it shows the code where you edit your images, instead of showing the table?
-Please, and thanks.