Jump to content

[SOLVED] mysql "and"....


phpSensei

Recommended Posts

Why does it work when i put user_level = '1', but not when I put "user_level = '1' and user_level = '2' "

 

	

<?php
$reporting = mysql_query("SELECT * FROM phpbb_users WHERE user_level = '1' & user_level = '2'");


				echo'
					<br>
					<br>
					<br />
				  <br />
				  <table width="603" border="0" align="center" cellpadding="0" cellspacing="0">
				  <tr>
				    <td height="35" align="left" background="images/portal/featured/featuredtexttop.jpg">          <span class="style28">Report<span class="style17"> a submission</span></span></td>
                        </tr>
				  <tr>
				    <td height="111" align="center" valign="middle" bgcolor="#0B0B0B" class="style29"><br />
				    <table width="462" border="0" cellpadding="0" cellspacing="0">
				      <tr>
				        <td width="400"><form name="form1" id="form1" method="post" action="view.php?subID='.$row['id_sub'].'&mode=Report_sub">
				          <table width="100%" border="0" cellspacing="6" cellpadding="0">
				            <tr>
				              <td width="20%" align="left" valign="top">Reason</td>
                                    <td width="80%" align="left" valign="top"><label>
                                      <select name="reason" size="1" class="listmenu" id="reason">
                                        <option value="Contains Adult Contents">Contains Adult Contents</option>
                                        <option value="Illegal Material (drugs, pirate links, milicious code..etc)">Illegal Material (drugs, pirate links, milicious code..etc)</option>
                                        <option value="Threat to your life or friend">Threat to your life or friend</option>
                                        </select>
                                      </label></td>
                                  </tr>
				            <tr>
				              <td align="left" valign="top">Report To </td>
                                    <td align="left" valign="top"><select name="user" class="listmenu" id="user">
								';

								while($to = mysql_fetch_array($reporting)){

								echo '<option value="'.$to['username'].'">'.$to['username'].'</option>';

								}

								echo'
								</select></td>
                                  </tr>
				            <tr>
				              <td height="125" align="left" valign="top">Add details </td>
                                    <td align="left" valign="top"><label>
                                      <textarea name="detail" cols="40" rows="10" class="login_field" id="detail"></textarea>
                                      </label></td>
                                  </tr>
				            <tr>
				              <td height="43" colspan="2" align="center" valign="middle"><label>
				                <input name="pm" type="submit" class="button_submit" id="pm" value="Send PM to Mod/Admin" />
				                </label></td>
                                    </tr>
				            </table>
                              </form></td>
                            </tr>
				      </table></td></tr>
				  </table><br><br>
			      </td></tr>
                  
                </table></td>
              <td width="20" rowspan="2" valign="top" bgcolor="#1D1D1D"><br /></td>
              </tr>
            
            <tr>
              <td colspan="3" valign="top" bgcolor="#242424"></td>
            </tr>
            
          </table>          </td>
        </tr>
      
      
    </table>
      <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="images/footer/adverticetop.jpg" width="850" height="29" /></td>
      </tr>
      <tr>
        <td height="99" background="images/footer/adverticemiddle.jpg"><div align="center" class="style1 style3">A d v e r t i c e    H e r e</div></td>
      </tr>
      <tr>
        <td height="30" background="images/footer/adverticeend-footer.jpg"><div align="center" class="style1"><span class="style3">©2007 </span><span class="style5">Flash-Portal.org</span></div></td>
      </tr>
</table></td>
  </tr>
</table>
<p> </p>
</body>
</html>
';
	?>			

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.