Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Echo the query. Then copy and paste that into phpmyadmin SQL window.
  2. Echo the query with the values filled in and run it in MySQL. By using a sum you may just be getting a sum of 0.
  3. Dude. http://us3.php.net/manual/en/language.types.array.php Arrays. Learn to use them.
  4. Well, you'll have to either store the name value without the [], and add it when you create the checkboxes, or store both versions, or manipulate the string later. There's lots of ways to do it.
  5. ["name"]=> string(6) "food[]" See the problem? "food[]" is a 6 character string. $_POST has a key of "food", a 4 character string.
  6. You need to be more clear.
  7. var_dump($data); What's in it? The undefined index means that $data['name'] cannot be set to 'food'. It's set to something that doesn't exist in $_POST. You can also do a print_r() on any of those arrays to see whats in them.
  8. $id = (int) $_POST['form_id']; Then add your where clause.
  9. At my work we use SVN, CVS and Git. I've mostly been working with CVS, but I worked with SVN at a previous job. Now my projects are moving to Git. For most people, it doesn't matter which you use, just use SOMETHING. Beyond that, I think Git is the better of them.
  10. Code?? foreach($arr AS $key=>$val){ Echo "$key $val"; }
  11. I don't ... Even ...
  12. http://lmgtfy.com/?q=php+trim
  13. If they're strings, you may need to trim them.
  14. You think <table border = 0 width = 100%<tr> is valid code? Run it through a validator and see.
  15. <br /><table border = 0 width = 100%<tr><td style='text-align:right; padding:3px 3px 0px 3px; Border:2px; font:15px Arial, sans-serif'>System:</td><td style='text-align:left; padding:3px 3px 0px 3px; font:15px Arial, sans-serif'>Bryan, TX</td></tr><tr><td style='text-align:right; padding:3px 3px 0px 3px; Border:2px; font:15px Arial, sans-serif'>Display Channel:</td><td style='text-align:left; padding:3px 3px 0px 3px; font:15px Arial, sans-serif'>69</td></tr><tr><td style='text-align:right; padding:3px 3px 0px 3px; Border:2px; font:15px Arial, sans-serif'>Station:</td><td style='text-align:left; padding:3px 3px 0px 0px; font:15px Arial, sans-serif'>Inspirational (Digital Only)</td></tr><tr><td style='text-align:right; padding:3px 3px 0px 3px; font:15px Arial, sans-serif'>EIA Channel:</td><td style='text-align:left; padding:3px 3px 0px 0px; font:15px Arial, sans-serif'>75</td></tr><tr><td style='text-align:right; padding:3px 3px 0px 3px; font:15px Arial, sans-serif'>Frequency:</td><td style='text-align:left; padding:3px 3px 0px 0px; font:15px Arial, sans-serif'>531 MHz</td></tr></table><br /><table style='border-collapse:collapse; font:15px Arial, sans-serif'; width='100%' border='3'><CAPTION>Stations on Digital Rail 75</CAPTION><tr><th style='font-size:1em; font:15px Arial, sans-serif'; width = '80%'>Station</th><th style='font-size:.85em; font:15px Arial, sans-serif';width = '20%'> Display <br /> Channel</th></tr><tr bgcolor='#A9F5A9'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>Bravo</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>63</td></tr><tr bgcolor='#FFFFFF'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>MSNBC</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>64</td></tr><tr bgcolor='#A9F5A9'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>CMT</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>65</td></tr><tr bgcolor='#FFFFFF'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>GAC</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>66</td></tr><tr bgcolor='#A9F5A9'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>CSPAN2</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>67</td></tr><tr bgcolor='#FFFFFF'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>TBN</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>68</td></tr><tr bgcolor='#A9F5A9'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>Inspirational (Digital Only)</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>69</td></tr><tr bgcolor='#FFFFFF'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>LMN</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>70</td></tr><tr bgcolor='#A9F5A9'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>Jewelry (Digital Only)</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>71</td></tr><tr bgcolor='#FFFFFF'><td style='text-align:left; padding:3px 0px 3px 12px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>EWTN (Digital Only)</td><td style='text-align:right; padding:3px 12px 3px 0px; border-collapse:collapse; font:15px Arial, sans-serif'; border = '3'>72</td></tr></table> <html> As I told you, your table tag is not closed, and you need to quote the attributes. You also did NOT add any 50%. Make the first two <td>s into <th> and put style="width: 50%" on them.
  16. Variable variables would be $$cid; No string needed. That said. IT'S THE WRONG WAY TO DO IT. Put them in an array, or even better a database. And stop using global.
  17. Did you actually read his post? He explained the correct way to do it. Now do it that way.
  18. :eyeroll: and I just removed that thread for being a duplicate. Just post the code HERE. In code tags. All you need to do is move your query to before the point where you intend to use values you get FROM the query.
  19. Because arrays start at 0, so the size of an array is 1 more than the last key. (assuming normally incremented keys like in this example, an assoc array is a whole other ballpark.) array_pop
  20. :facewall:
×
×
  • 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.