searls03 Posted March 22, 2011 Share Posted March 22, 2011 Ok, so I want to basically be able to update multiple member statuses at once......basically I want to display a list of members that will have a textbox by them to enter data..........then I can type in each of the data that I need and it will update each and every profile with the correct data for that member.....can anyone help me figure a way to do this..... Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/ Share on other sites More sharing options...
Maq Posted March 22, 2011 Share Posted March 22, 2011 Assuming you're extracting these members from a DB, when you display the members just associate the text box with the unique id. Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190962 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 That is actually what I basically need help with...........cause it is going to grab my userid I am sure and I need it not to do this...... Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190965 Share on other sites More sharing options...
EmperorJazzy Posted March 22, 2011 Share Posted March 22, 2011 That is actually what I basically need help with...........cause it is going to grab my userid I am sure and I need it not to do this...... Â Your user database would contain unique identifiers for each user correct? Â As you build the output to the screen, set the value of the text box to the unique identifier for that user line. Â ....value="' . echo $query['unique'] . '" Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190981 Share on other sites More sharing options...
cunoodle2 Posted March 22, 2011 Share Posted March 22, 2011 searls03, as I have mentioned numerous times with your posts in the past. If you ask better questions you will get better answers. Show us what query/code you are using. Then address all of the following questions..  1. What error messages (if any) are you getting? 2. What is it ACTUALLY doing? 3. What do you EXPECT it to do? 4. Ideally provide a sample data set.  There are probably more posts on your threads then anyone else due to all of the vagueness and the back and forth on all comments. Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190983 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 look, I am sorry alright.....I don't have a code for it right now.....that is sorta what I was hoping to get some help on............I am in the finishing stages of the website and this is one of the last things I need to get working...........so I am hoping someone can help me come up with a code that could get me STARTED......and I could hopefully go from there....... Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190989 Share on other sites More sharing options...
Maq Posted March 22, 2011 Share Posted March 22, 2011 First you need to extract the information from your database, so start here: http://us2.php.net/mysql_query Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190994 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 thank you........I will tell you when I do..... Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1190995 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 ok, I know how to extract data from database, so how do I make it so that each result is with specific id? Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191027 Share on other sites More sharing options...
Maq Posted March 22, 2011 Share Posted March 22, 2011 ok, I know how to extract data from database, so how do I make it so that each result is with specific id? Each member should have a unique id, probably an auto-incremented one, just associate it with the text box. Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191033 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 ok, so here is what displays the search results..........I also need to know how to make this one form with one submit button show up.............it keeps on associating it with my id........can you help me associate it with the right id? Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191034 Share on other sites More sharing options...
Maq Posted March 22, 2011 Share Posted March 22, 2011 ok, so here is what displays the search results..........I also need to know how to make this one form with one submit button show up.............it keeps on associating it with my id........can you help me associate it with the right id? Sure, post your code. Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191035 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 oh, sorry, I had it copied and everything...... <form method="post" action="scoutmanager.php"> <input type="hidden" name="submitted" value="true" ?/> <table width="896" border="0" cellspacing="0" cellpadding="0">  <tr>   <td width="127" bgcolor="#F7E496" class="adfd" scope="col"><strong>Property</strong></td>   <td width="181" bgcolor="#F7E496" scope="col"><strong>Value</strong></td>   <td width="588" bgcolor="#F7E496" scope="col"> </td>   </tr>  <tr>   <td bgcolor="#F7E496"><select name="category">    <option value="name">Name</option>    <option value="address">Address</option>    <option value="phone">Phone Number</option>    <option value="username">Username</option>   </select></td>   <td bgcolor="#F7E496"><input type="text" name ="criteria" /></td>   <td bgcolor="#F7E496"><input type="submit" /></td>   </tr>  <tr>   <td bgcolor="#F7E496"> </td>   <td bgcolor="#F7E496"> </td>   <td bgcolor="#F7E496"> </td>  </tr>  <tr>   <td bgcolor="#F7E496"> </td>   <td bgcolor="#F7E496"> </td>   <td bgcolor="#F7E496"> </td>  </tr>  </table> </form> <?php if (isset($_POST['submitted'])) { include('connect1.php'); $category = $_POST['category']; $criteria = $_POST['criteria'] ; $query = "SELECT * FROM members WHERE $category LIKE '%".$criteria."%'"; $result = mysqli_query($dbcon, $query) or die('error getting data'); $num_rows = mysqli_num_rows($result); echo "$num_rows results found"; echo "<table width=\"896\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; echo "<tr bgcolor=\"#F7E496\"><td bgcolor=\"#F7E496\"><strong>ID</strong></td> <td bgcolor=\"#F7E496\"><strong>Merit Badges</strong></td> <td bgcolor=\"#F7E496\"><strong></strong></td><td bgclor=\"#F7E496\"></td></tr>"; while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo "<form action=\"scout.php\" method=\"post\">  <p>   <input name=\"badges\" id=\"badges\" type=\"text\" value=\" $badges\"/>   <span class=\"adfa\"> <br /> (enter a ,[comma] then [space] then merit badge name)   </span>  </p>  <label for=\"rank\"></label>  <select name=\"rank\" id=\"rank\">   <option value=\"Scout\">Scout</option>   <option value=\"Tenderfoot\">Tenderfoot</option>   <option value=\"Second Class Scout\">Second Class Scout</option>   <option value=\"First Class Scout\">First Class Scout</option>   <option value=\"Star Scout\">Star Scout</option>   <option value=\"Life Scout\">Life Scout</option>   <option value=\"Eagle Scout\">Eagle Scout</option>   <option value=\"\" selected=\"selected\">$rank></option>  </select>" ; echo "<hr />"; echo "</td></tr>"; echo "<input type=\"hidden\" name=\"userid\" id=\"userid\">"; echo "<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Save\" />  </p>"; echo "</form>"; } echo "</table>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191037 Share on other sites More sharing options...
searls03 Posted March 22, 2011 Author Share Posted March 22, 2011 btw, this is what does the posting: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ [url=http://'http://www.flashbuilding.com/']www.flashbuilding.com[/url] -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' limit 1"); while($row = mysql_fetch_array($sql)){ $userid = $row['userid']; } // Process the form if it is submitted if ($_POST['rank']) { $badges = $_POST['badges']; $rank = $_POST['rank']; $sql = mysql_query("UPDATE members SETÂ badges='$badges', rank='$rank', userid='$userid'"); printf("Records updated: %d\n", mysql_affected_rows()) ; exit(); } // close if post ?> Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191038 Share on other sites More sharing options...
searls03 Posted March 23, 2011 Author Share Posted March 23, 2011 any help????????????? Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1191459 Share on other sites More sharing options...
searls03 Posted March 25, 2011 Author Share Posted March 25, 2011 come on, I need this page and my registration page working is all then I am done I do believe............ Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1192315 Share on other sites More sharing options...
searls03 Posted April 6, 2011 Author Share Posted April 6, 2011 anything? Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1197879 Share on other sites More sharing options...
Nuxius Posted April 6, 2011 Share Posted April 6, 2011 Thank you for refreshing this for me Maq Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1197888 Share on other sites More sharing options...
searls03 Posted April 6, 2011 Author Share Posted April 6, 2011 yep..... Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1197890 Share on other sites More sharing options...
searls03 Posted April 7, 2011 Author Share Posted April 7, 2011 so I have it so it updates correct person now.......it only will display my id associated stuff in each $badges box for everyone.....: <?php if (isset($_POST['submitted'])) { include('connect1.php'); $category = $_POST['category']; $criteria = $_POST['criteria'] ; $query = "SELECT * FROM members WHERE $category LIKE '%".$criteria."%'"; $result = mysqli_query($dbcon, $query) or die('error getting data'); $num_rows = mysqli_num_rows($result); echo "$num_rows results found"; echo "<table width=\"896\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; echo "<tr bgcolor=\"#F7E496\"><td bgcolor=\"#F7E496\"><strong>name</strong></td><td bgcolor=\"#F7E496\" ><strong>Merit Badges</strong></td><td bgcolor=\"#F7E496\"><strong>Rank</strong></td><td bgclor=\"#F7E496\"></td></tr>"; while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {$color = ($color == 'white')?'#fffccc':'white'; echo "<tr bgcolor='$color'><td> <input type=\"hidden\" name=\"userid\" id=\"userid\" value=".$row['userid'].">"; echo $row['name']; echo " </td><td> <form action=\"scout.php\" method=\"post\">    <textarea name=\"badges\" id=\"badges\" cols=\"40\" rows=\"3\" type=\"textarea\">$badges</textarea></td><td>   <span class=\"adfa\">   </span>   <label for=\"rank\"></label>  <select name=\"rank\" id=\"rank\">   <option value=\"Scout\">Scout</option>   <option value=\"Tenderfoot\">Tenderfoot</option>   <option value=\"Second Class Scout\">Second Class Scout</option>   <option value=\"First Class Scout\">First Class Scout</option>   <option value=\"Star Scout\">Star Scout</option>   <option value=\"Life Scout\">Life Scout</option>   <option value=\"Eagle Scout\">Eagle Scout</option>   <option value=\"\" selected=\"selected\"$rank></option> </td><td>  "; } echo" <input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Save\" /> </td></tr>"; echo "</form>"; echo "</table>"; } ?>       Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1198446 Share on other sites More sharing options...
searls03 Posted April 7, 2011 Author Share Posted April 7, 2011 ok, I guess it is also only updating mine too...... Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1198449 Share on other sites More sharing options...
searls03 Posted April 22, 2011 Author Share Posted April 22, 2011 help? Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1204851 Share on other sites More sharing options...
searls03 Posted April 22, 2011 Author Share Posted April 22, 2011 don't I need like a loop or something that runs the submit? Quote Link to comment https://forums.phpfreaks.com/topic/231419-run-a-report-on-a-member/#findComment-1204854 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.