A
Anonymous
Guest
hi..i already design a page something like phonebook.i need ur help because i need a script to check all the checkboxes by clicking only one button instead of doing it one by one...
here is my code:
where should i put the check all script...?
thanks in advance...
here is my code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SMS Broadcast</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
//include "./conn1.inc";
?>
<table width="525" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center" class="style8 style4">SMS Broadcast </div></td>
</tr>
<tr>
<td height="20"> </td>
</tr>
</table>
<table width="652" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="786" height="26" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="110"><div align="center" class="style1 style2"><a href="pgBroadcast.php">Broadcast SMS</a> </div></td>
<td width="110"><div align="center" class="style3"><strong><a href="phonebook.php">My Phonebook</a></strong></div></td>
<td width="110"><div align="center" class="style3"><strong><a href="pgScheduledBroadcast.php">My Schedule </a></strong></div></td>
<td width="110"><div align="center" class="style3"><strong><a href="pgHistory.php">My History </a></strong></div></td>
<td width="110"><div align="center" class="style3"><strong><a href="mymanager.php">My Manager</a> </strong></div></td>
<td width="110"><div align="center"><span class="style3"><strong><a href="mycredit.php">My Credit </a></strong></span></div></td>
<td width="110"><div align="center" class="style3"><strong><a href="logout.php">Logout</a></strong></div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<p> </p>
<form action=
<?php
if ($page==1)
echo "pgBroadcast.php";
else if ($page==2)
echo "pgScheduledBroadcast.php";
?>
method="post">
<form action="pgBroadcast.php" method="post">
<table align="center" width="720">
<tr>
<td width="720" align="center" bgcolor="#DCDCDC"><strong>Personal address book</strong></td>
</tr>
</table>
<div align="center">
<table align="center" border="0" cellpadding="1" cellspacing="0" width="720">
<tr>
<td width="200" align="center" bgcolor="#FFFFCC"><div align="left"><strong>Group Name</strong></div></td>
<td width="200" align="center" bgcolor="#FFFFCC"><div align="left"><strong>Username</strong></div></td>
<td width="180" align="center" bgcolor="#FFFFCC"><div align="left"><strong>Mobile Number</strong></div></td>
<td width="140" align="center" bgcolor="#FFFFCC"><div align="left"><strong></strong></div></td>
</tr>
<?php
$query = "Select * FROM Phonebook where Groupname='$Groupname' order by Groupname,Username asc;"; //where Groupname=$Groupname;";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
$ID = $row["ID"];
$X = $row["Groupname"];
$Y = $row["Username"];
$Z = $row["MobileNumber"];
?>
<tr>
<td width="200">
<div align="left">
<?
echo "<input name='zon2[]' type='checkbox' value='$Z'>";
echo "<strong><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>";
echo $X;
?></div></td>
<td width="200"><div align="left"><span class="style1 style2"><? echo $Y; ?></span></div></td>
<td width="180"><div align="left"><span class="style1 style2"><? echo $Z; ?></span></div></td>
<td width="140" height="20" colspan="2" ><div align="right"><?
echo "<a href='edit.php?ID=$ID'>edit</a>::<a href='delete.php?ID=$ID' onClick=\"return confirm('Are you sure?')\">delete</a>"; echo "<br>";
echo "</font></strong>";
?> </div></td></tr>
<? } ?>
</table>
</div>
</FORM>
<h4><center>
<form action="pgBroadcast.php" method="post">
<table border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td><p align="center"><input type="Submit" value="Use Addresses" name="submit"></p></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
where should i put the check all script...?
thanks in advance...