Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-04-2013, 10:47 AM   PM User | #1
Whatnot
New Coder

 
Join Date: Feb 2011
Posts: 69
Thanks: 7
Thanked 1 Time in 1 Post
Whatnot is an unknown quantity at this point
Smile some help needed on delete image

hello

I want to add a delete image code to delete image by mysql

so far I got this

Code:
<script type="text/javascript" src="includes/js/jquery-1.3.2.js" ></script>


<?
$epuid = $_GET["id"];
$email = $_SESSION['email'];
$groupname = hex2str($_GET["id"]); 
$idalb = hex2str($_GET["album"]); 
$result = mysql_query("SELECT * FROM albums WHERE ID=".$idalb);
//$idimg = mysql_result($result,0,"ID");
$resultimg = mysql_query("SELECT * FROM images WHERE albumID =".$idalb);
//$text = hex2str($_GET['content']);
$show = mysql_result($result,0,"albshow");
$name = mysql_result($result,0,"name");

?>
<form method="post" action="?id=<?=$epuid;?>&album=<?=$_GET['album'];?>&action=done<? if(isset($_GET['own'])) {echo '&own=owner';}?>">

  <input type="hidden" name="groupname" value="<?php echo $groupname ?>" />
  <input type="hidden" name="idalbum" value="<?php echo $idalb ?>" />
<strong>Album Name</strong><span class="style1">*</span>:
    <input type="readonly" name="albumname" size="35" value="<? echo $name  ?>" /><br /><br />
<strong>Album Photos</strong><span>*</span>: <br />

    <table><tr><td id="files"><?  while($row=mysql_fetch_array($resultimg))
	{
		echo "<img src='".$row['img']."' width='120' height='120' style='margin:5px;'>";
		}
		if(isset($_SESSION['session_temp']))
	{
	$resultimg = mysql_query("SELECT * FROM images WHERE albumID =".$_SESSION['session_temp']);
	while($row=mysql_fetch_array($resultimg))
	{
		echo "<img src='".$row['img']."' width='120' height='120' style='margin:5px;'>";
		}
	}
	?></td></tr></table>
	<br />
    <br />
   
    <br />
    <br />
    <input type="submit"  name="add_item" value="CLICK HERE TO SAVE CHANGE!" />
  <br />
  <br />
  <span>*</span> = required  </p>
</p>
</form>
how would I do it?

Thank you for Replies
Whatnot is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:27 AM.


Advertisement
Log in to turn off these ads.