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

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -