hustler
New Members-
Posts
9 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
hustler's Achievements
Newbie (1/5)
0
Reputation
-
that means this is a part which shows select box with all usernames [code]<?php //list members require_once("includes/class.member.php"); $objMember=new Member(); $arrMemberList=$objMember->getMembers("on"); if(count($arrMemberList)==0) echo "No activated members were found.<br>"; else{ ?> <tr> <td>Select Member</td> <td> <select name=member_id class=fieldbox> <?php while($member=array_pop($arrMemberList)){ echo "<option value='".$member["id"]."'>".$member["username"]."\n"; } ?> </select>[/code] but i want a simple input box where i can enter username myself instead of selecting. Thanx
-
ok can anyone guide me for Just replacing the <select> box which shows usernames to select to Input box where i can enter the username directly Thanx
-
hi, i have a form in admin panel from where we add quote for username, at the moment it gives an option to select the username and then enter the details for him. But i want an extra field with select box wher i can enter the username directly to enter his records. here is the code [code] <?php if(!empty($req_form_action)){ if($req_form_action=="addQuickQuote"){ //check for valid reference number $strQuery="SELECT count(*) FROM master_quotes WHERE reference_number LIKE '".$req_ref_num."'"; if($dbConn->getValue($dbConn->executeQuery($strQuery),0)>0){ //insert $strSQL="INSERT INTO quick_quotes VALUES ( NULL, ".$req_member_id.", '".$req_contact_name."', '".$req_group_id."', '".$req_ref_num."')"; //echo $strSQL; if($dbConn->executeQuery($strSQL)) $log="Quote Added<br>"; else $log=mysql_error(); } else{ $log="The reference number: <b>".$req_ref_num."</b> does not exists in master database."; } } } if(!empty($log)) echo "<font color=red>".$log."</font><br>"; //list groups $strSQL="SELECT * FROM groups ORDER By groupname"; $res=$dbConn->executeQuery($strSQL); $groups=array(); while($group=$dbConn->getRecords($res)){ $groups[]=$group; } if(count($groups)==0) echo "No groups were found. <a href=admin.php?c=addGroup>Click here</a> to create group first.<br>"; else{ ?> <form method=post> <input type=hidden name="form_action" value="addQuickQuote"> <table cellspacing=0 cellpadding=0 width=90% border=1> <?php //list members require_once("includes/class.member.php"); $objMember=new Member(); $arrMemberList=$objMember->getMembers("on"); if(count($arrMemberList)==0) echo "No activated members were found.<br>"; else{ ?> <tr> <td>Select Member</td> <td> <select name=member_id class=fieldbox> <?php while($member=array_pop($arrMemberList)){ echo "<option value='".$member["id"]."'>".$member["username"]."\n"; } ?> </select> </td> </tr> <?php } ?> <tr> <td>Contact name</td> <td> <INPUT size=19 name="contact_name" type=text class=fieldbox> </td> </tr> <tr> <td>Group</td> <td> <select name=group_id class=fieldbox> <?php while($group=array_pop($groups)){ echo "<option value='".$group["id"]."'>".$group["groupname"]."\n"; } ?> </select> </td> </tr> <tr> <td>Reference Name</td> <td> <INPUT size=19 name="ref_num" type=text class=fieldbox> </td> </tr> <tr> <td colspan=2 align=center><input type=submit value="Add Quick Quote" class=fieldbox></td> </tr> </table> </form> <?php } ?> [/code] you experianced people can figure it out very easily but being having very little php knowledge i cant figure it out. what i want is just an option with the select box where i can enter the username directly rather than selecting it. This is current what it is Select member :_____ (this is drop down, which shows all members) Contact name: ____- Group:_________ Reference number:___________- I want it like this Select member :_____ (this is drop down) or Enter Member name______ Contact name: ____ Group:_________ Reference number:___________ all help appreciated!
-
Thanx for reply, can we do it without making a seperate page for delete_pm.php?
-
Hi i have system where registered users and admin can send messages to each other. messages is sent thru sendpm.php and read thru readpm.php everything works fine but i need to make an option to delete the message. How can i create a "delete" link in front of each message so that when it is pressed the message gets deleted.?? This are the fields in "messages" table:- message_id message_to message_from message_subject message senton
-
Thanx Mate that worked! the next question is We have a member list in the admin where the admin can see all the active members. At the moment it displays as a list and we can edit and delete them. What i want at the top is search box where we can enter surname of the member and it display us only ones with that surname. current code is [code] <?php require_once("includes/class.member.php"); $objMember=new Member(); $arrMemberList=$objMember->getMembers($req_isActive); if(count($arrMemberList)>0){ ?> <form method=post> <input type=hidden name="form_action" value="delete"> <table cellspacing=0 cellpadding=0 width=90% border=1> <tr> <td> </td> <td><font face=verdana size=3><b>Name</td> <td><font face=verdana size=3><b>Email</td> <td><font face=verdana size=3><b>Contact</td> <td><font face=verdana size=3><b>Username</td> <td><font face=verdana size=3><b>Postcode</td> </tr> <?php while($member=array_pop($arrMemberList)){ ?> <tr> <td> <input type=checkbox name=id[] value="<?php echo $member["id"];?>"> <a href='admin.php?c=editMember&mid=<?php echo $member["id"];?>'>Edit</a> </td> <td> <font face=verdana size=2> <?php echo $member["firstname"]." ".$member["lastname"];?> </font> </td> <td> <font face=verdana size=2> <?php echo $member["email"];?> </font> </td> <td><font face=verdana size=2><?php echo $member["contact"];?> </td> <td><font face=verdana size=2><?php echo $member["username"];?> </td> <td><font face=verdana size=2><?php echo $member["postcode"];?> </td> </tr> <?php } ?> <tr> <td colspan=6 align=center><input type=submit value="Delete Selected"></td> </tr> </table> </form> [/code]
-
when i use this i get a output in my page= Resource id #9
-
Thanx for you replies sorry for being silly [code]<?php $query='SELECT COUNT(*) FROM `members`'; $result= mysql_query($query); echo $result; ?>[/code] but will this do?
-
How can we count the number of entries in the table For example i have a member table, where all the data for members is stored I want to display in the admin panel that we have this number of members! How to do it.