php - Warning: mysql_fetch_assoc() expects parameter error in a while loop -
im creating simple mailing list check boxes each email listed. how ever throws out error when try , put form.
php
<?php error_reporting(-1); require '../database/connect.php'; echo "<h1>mailing list</h1>"; $mailcount = 0; $namecount = 0; $get = mysql_query("select * cliet_data send = 1"); echo "<form action='send.php' method='get'>"; while ($getrow = mysql_fetch_assoc($get)){ echo "<input type='checkbox' name='mail_'".$mailcount." value='".$getrow['email']."' checked <br/>".$getrow['name'].">"; } echo "</form>"; ?>
any appreciated
use like
if(mysql_num_rows($get) > 0) { while ($getrow = mysql_fetch_assoc($get)){ echo "<input type='checkbox' name='mail_'".$mailcount." value='".$getrow['email']."' checked <br/>".$getrow['name'].">"; } }
Comments
Post a Comment