deleting guestbook messages with code attachment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi

im having major problems deleting multiple messages from the guestbook i
have created

im new to php so any replies to this problem will have to easy for me to
understand

i have got my guestbook reading and showing entries and have added
checkboxes under each entry for the deletion process

heres what it looks like:

while ($rows = mysql_fetch_array($result)) {

$id = $rows["id"];
$firstname = $rows["first_name"];
$lastname = $rows["last_name"];



///////////////////////////////////////////////////////////////
//// ACCESS THE DATABASE'S timestamp RECORD TO SHOW DATE AND
//// TIME ENTRIES WERE MADE
//////////////////////////////////////////////////////////////

$db_date = $rows['time'];
$yr = substr($db_date, 0, 4);
$mon  = substr($db_date,4,2);
$day  = substr($db_date,6,2);
$hour = substr($db_date,8,2);
$min  = substr($db_date,10,2);
$sec  = substr($db_date,12,2);
$orgdate = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year));

?>

<?///////////////////////////////////////////////////////////////?>
<? //TABLE TO SHOW THE CONTENTS OF USER_MESSAGE DATABASE TABLE ?>
<?///////////////////////////////////////////////////////////////?>

<HTML>
<HEAD>
<TITLE>Queen Vic Message Book</TITLE>
</HEAD>
<BODY>
<FORM METHOD="post" ACTION="delete.php">


<P><TABLE BORDER="1" WIDTH="600" BORDERCOLOR=#F00000>

<TR>
<b>Date/Time Posted:</b> <? echo $orgdate; ?>
</TR>

<TR>
<TD><b>Name:</b> <? echo $rows['name']; ?></TD>

<TD><b>Email:</b>  <A HREF="mailto:<? echo $rows['email']; ?>">
   <? echo $rows['email']; ?></TR></TD>



<TR><TD COLSPAN="4">
<? echo $rows['message']; ?>
</TD></TR>
</TABLE>
<TD>
<b>Delete Message</b> <input type="checkbox" name="id[]" value="$id">
</TD>
</P>
</BODY>
</HTML>

<?/////////////////////////////////////////////////////////////////?>
<?//// CLOSES LOOP CREATED FOR ADDING DATA TO TABLE?>
<?/////////////////////////////////////////////////////////////////?>
<? } ?>



i have tried to make the value of the checkbox the message id (is this
right?)

what do i need to do next

please help i have to hand this project in soon :(

php script is attached and if anyone can look at it and sort it for me i
would appreciate it very much

(thejack@btinternet.com)  send working script there please :D
thanks



begin 666 deletemess.php
M#0H\/PT*#0HO+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-"B\O+R\@1$5&24Y%(%9!4DE!
M0DQ%4R!&3U(@9&%T86)A<V4L('1A8FQE+"!C;VYN96-T:6]N($%.1"!72$E#
M2" -"B\O+R\@9&%T86)A<V4@5$\@0T].3D5#5"!43PT*+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O#0H-"B1D8E]N86UE(#T@(G1E<W1D8B([#0H-"B1T86)L95]N86UE
M(#T@(G5S97)?;65S<V%G92([#0H-"B1C;VYN96-T:6]N(#T@0&UY<W%L7V-O
M;FYE8W0H(FQO8V%L:&]S="(L(")M87)K(BP@(G1R=7-T;F\Q(BD@#0H);W(@
M9&EE*")#;W5L9&XG="!C;VYN96-T+B(I.PT*#0HD9&(@/2!M>7-Q;%]S96QE
M8W1?9&(H)&1B7VYA;64L("1C;VYN96-T:6]N*0T*"6]R(&1I92@B0V]U;&1N
M)W0@<V5L96-T(&1A=&%B87-E+B(I.PT*#0H-"B\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+PT*
M+R\O+R!1545262!43R!)3E-%4E0@5D%,5453($]&(%1(12!G=65S=&)O;VM?
M9F]R;2!)3E1/(%1(12 -"B\O+R\@=7-E<E]M97-S86=E(%1!0DQ%#0HO+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+PT*( T*:68@*"@D;F%M92 A/2 B(BD@?'P@*"1E;6%I;" A
M/2 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T[
M(#\^/"]44CX\+U1$/@T*#0H-"@T*/%12/CQ41"!#3TQ34$%./2(T(CX-"CP_
M(&5C:&\@)')O=W-;)VUE<W-A9V4G73L@/SX-"CPO5$0^/"]44CX-"CPO5$%"
M3$4^#0H\5$0^#0H\8CY$96QE=&4@365S<V%G93PO8CX@/&EN<'5T('1Y<&4]
M(F-H96-K8F]X(B!N86UE/2)I9%M=(B!V86QU93TB)&ED(CX-"CPO5$0^#0H\
M+U ^#0H\+T)/1%D^#0H\+TA434P^#0H-"CP_+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\_/@T*/#\O+R\O($-,3U-%4R!,3T]0($-214%4140@1D]2($%$1$E.1R!$
M051!(%1/(%1!0DQ%/SX-"CP_+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\_/@T*/#\@
M?2 _/@T*/$E.4%54(%194$4](G-U8FUI="(@3D%-13TB9&5L971E(B!604Q5
M13TB1&5L971E($UE<W-A9V5S(CX-"CQ0/CQA(&AR968](F=U97-T8F]O:U]F
G;W)M+FAT;6PB/D%D9"!!;F]T:&5R($UE<W-A9V4\+V$^/"]P/@T*
`
end


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux