Jump to content

rondog

Members
  • Posts

    753
  • Joined

  • Last visited

    Never

Everything posted by rondog

  1. Let me rephrase that quote. I tried using an HTML array. Each user (row) has its own radio button group. If I set the name of the radio button group to userlevel[], its one giant row meaning I can only select 1 radio button across all 4 rows you see in the image above. This is my form code: <form method="post"> <table cellpadding="4" border="0"> <tr style="text-align:center;font-weight:bold;background-color: #777777; color: #ffffff;"> <td>Username</td> <td>Email</td> <td>First Name</td> <td>Last Name</td> <td>Deactivate?</td> <td>User Level</td> </tr> <tr class="usertable"> <td><div align="center">some username</div></td> <td><div align="center">someemail@domain.com</div></td> <td><div align="center">some first name</div></td> <td><div align="center">some last name</div></td> <td><div align="center"><a href="?do=mngu&a=deactivate&id=28">Deactivate</a></div></td> <td><label> <input type="radio" name="userlevel0" value="1" checked="checked"/> Admin</label> <br/> <label> <input type="radio" name="userlevel0" value="0" /> User</label></td> </tr> <tr style="background-color: #4f4f4f" class="usertable"> <td><div align="center">some username</div></td> <td><div align="center">someemail@domain.com</div></td> <td><div align="center">some first name</div></td> <td><div align="center">some last name</div></td> <td><div align="center"><a href="?do=mngu&a=deactivate&id=27">Deactivate</a></div></td> <td><label> <input type="radio" name="userlevel1" value="1" checked="checked"/> Admin</label> <br/> <label> <input type="radio" name="userlevel1" value="0" /> User</label></td> </tr> <tr class="usertable"> <td><div align="center">some username</div></td> <td><div align="center">someemail@domain.com</div></td> <td><div align="center">some first name</div></td> <td><div align="center">some last name</div></td> <td><div align="center"><a href="?do=mngu&a=deactivate&id=26">Deactivate</a></div></td> <td><label> <input type="radio" name="userlevel2" value="1" /> Admin</label> <br/> <label> <input type="radio" name="userlevel2" value="0" checked="checked"/> User</label></td> </tr> <tr style="background-color: #4f4f4f" class="usertable"> <td><div align="center">some username</div></td> <td><div align="center">someemail@domain.com</div></td> <td><div align="center">some first name</div></td> <td><div align="center">some last name</div></td> <td><div align="center"><a href="?do=mngu&a=deactivate&id=25">Deactivate</a></div></td> <td><label> <input type="radio" name="userlevel3" value="1" checked="checked"/> Admin</label> <br/> <label> <input type="radio" name="userlevel3" value="0" /> User</label></td> </tr> </table> <input type="submit" name="savebtn" value="Save" /> </form> Now you can see all the radio button groups...I need to know how many radio button groups to post when I hit save and since the users table constantly changes in size, I need to know how many to post
  2. group = radio button group... If you look at the picture in the OP, you can see the rows.. each row you can select admin or user...each row is its own radio button group..when I POST, I don't know how many rows their are. This is my code so far: if (isset($_POST['savebtn'])) { // post the radio button groups }
  3. I cant be any more clear dude. Each row is its own group in the same form. When I submit I want to POST all the radio button groups, but since I don't know how many rows their are I can just do $_POST['userlevel0'], $_POST['userlevel1']..I need to know how many rows their is. I think I am just going to do the select before I post solution...
  4. I tried that..the problem is, each user is their own group. if I do userlevel[], all the rows are one big group.
  5. POST them dynamically..I don't know how many rows their are unless I do a select to get the num rows first which I am trying to avoid. If I get the num rows first and its equal to, say 5, then I know their are 5 groups of radio buttons meaning: userlevel0, userlevel1, userlevel2, userlevel3, userlevel4
  6. I have a table that shows all the users in my table. Each user is either a user or an admin. I have radio buttons for each user determining if they are a user or an admin Right now I have each RB group named userlevel0, userlevel1, userlevel2 etc.. How can I get all the groups dynamically? I attempted an html array but failed.
  7. I have a dynamic URL that looks like this: http://mysite.com/?do=video&id=23,15,116 I would like the URLs displayed as: http://mysite.com/video/23/15/116 but cannot figure out the rewrite rule. Any help would be appreciated!
  8. I have many columns, about 15 and it would just be easier to do keyname
  9. WHERE col != "" maybe..or do it in your php
  10. Can I write a query to search by using the keyname rather than entering all the fields? For example, I have a colA,colB,colC indexed with a keyname searchableFields Right now I write: SELECT * FROM table WHERE MATCH(colA,colB,colC) AGAINST($someVar) I want to be able to just do it like this: SELECT * FROM table WHERE MATCH(searchableFields) AGAINST($someVar) When I do that, I get a: #1191 - Can't find FULLTEXT index matching the column list error. Any ideas?
  11. echo "<table border=\"1\" align=\"left\"><tr><th>Player</th><th>Experience</th></tr>"; while ($row = mysql_fetch_assoc($result)) { echo "<tr align=\"center\"><td>john doe</td><td>894</td></tr>"; } echo "</table>";
  12. Yes I figured it was going to error...do this for ($i = 0; $i < 7; $i++) { $n = ($i + 1); $sql = "UPDATE ts12 SET djid='" . $_POST["TS" . $i] . "' WHERE id=" . $n . "<br/>"; $query = mysql_query($sql) or die(mysql_error()); } basically move the query part up into the for loop. I got rid of the $data var and named it $sql and set it to '=' rather than '.=' since we dont need to concat the string.
  13. sounds like you need some sort of barcode scanning software and in the software have it call a script when input is received from the device. Try googling the make/model of your scanner +software.
  14. geez, nobody believe in formatting code anymore? $data = ''; for ($i = 0; $i < 7; $i++) { $n = ($i + 1); $data .= "UPDATE ts12 SET djid='" . $_POST["TS" . $i] . "' WHERE id=" . $n; } Also, I dont think that query isn't going to work. I think you have to run the query each time in the loop. You cant just pass a big string like that. I may be wrong though, never tried that.
  15. From now on please wrap you code by hitting the php icon when posting. Also, I dont see a constant count. This file isn't index.php is it? Line 5 of this is an echo..
  16. I have a search going on: <?php $sql = "SELECT * FROM video WHERE MATCH(name,description,location,keywords) AGAINST('" . mysql_real_escape_string($_POST['searchfield']) . "' IN BOOLEAN MODE)"; ?> I have rows that contain either "fort worth" or "fort collins" for example. When I search "fort worth" it finds all the rows including the fort collins rows. That is expected as it contains "fort". The issue is "fort collins" is showing up before "fort worth" What can I do fix this? If I take out the "IN BOOLEAN MODE" part then it works, but breaks other parts of my search
  17. using the wild card works one way..but if I type "ronnie's" it doesn't find a record that contains "ronnies" because there is no apostrophe.
  18. Say I have one row with the word "ronnie" and another row with the word "ronnie's" When I do a match() against() with the keyword being "ronnie", the row containing the word "ronnie's" isn't included as a result. How can I overcome that?
  19. I think because the ' is treated as a word character then ronnie doesn't match that entire word. I'm not sure of the best way to overcome that. Well I guess that is my next hurdle
  20. yeah I read that. Ok I got a question..if I search "ronnie"and a row contains "ronnie's", why does that not count as a valid result?
  21. Oh, ok that is good to know. I can see you can also change that length. Thank you.
  22. So I've full text indexed the columns I want searchable: I have some rows inserted: Yet when I run a match() against(), I get 0 results: If I do: SELECT * FROM video WHERE MATCH (name) AGAINST ('test') I get 2 results. Why does that work, yet keywords don't?
  23. http://www.phpfreaks.com/forums/faqcode-snippet-repository/finding-a-location-within-x-mileskm-of-an-postal-code
  24. In phpmyadmin, once I do a fulltext on a field, is that the only time I have to do it or does it have to be indexed anytime new data is added or altered?
×
×
  • 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.