Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. oh shit lol, my bad I meant @ signs. Always mess those up
  2. hmm interesting. Does your database have the values you expect it to have? try echoing $pid and see what it has in it. Also, if pid is an int column, you can remove the single quotes around $pid in the query. single quotes denote strings
  3. did you remove the ampersands?
  4. can I see the page that send $_GET['id']
  5. if you took my advice on the hidden player name field, you change the foreach to the following foreach($_POST['player'] as $key => $player){ //every row has the same key in the post array, so the key for //the player name's will be the same key for his stats. so we can do $playerStat1 = $_POST['stat1'][$key];//and now we have the players stat1 //do the rest for the others //get the name $playerName = $_POST['name'][$key]; echo $playerName; $sql = "update etc etc etc"; $query = mysql_query($sql); //etc. }//end foreach
  6. remove all your ampersands, and set error handling to just E_ALL. Ampersands suppress warnings and errors
  7. Did you upload that script to your server? See how stupid of an answer you get when you don't provide details about your problem. Most people won't even look at your code if they have to figure out what errors you MIGHT be getting with no help from you.
  8. I'll show you an example with regular arrays, and you can adapt that to your code. //lets we we have 3 different values we want to add to our array $val1, $val2, $val3 //now to add them to the array we simply do $array[] = $val1; $array[] = $val2; $array[] = $val3; //now lets say val val2 and val3 are arrays. we can still do the above. $val1 = array("one", "two", "three"); $array[] = $val1; //to access the first element in val1, we can do echo $array[0][0];//echos "one" There is a pretty good array tutorial in my sig if your interested
  9. thats because you surround your string with single quotes. Single quotes don't parse PHP while double quotes does. That means variables like the one you have in that string will be output as $variable, rather than their actual value. With double quotes, the $variable will echo its value. for example $hello="string"; echo '$hello';//echos $hello echo "$hello";//echos string
  10. it helps when you post what the error is, but its probably this $spm = mysql_query("INSERT INTO `private_msg` (`to`,`from`,`date`,`subject`,`content`) VALUES '$to ','$from ','$date ','$subject','$message')" which should be $spm = mysql_query("INSERT INTO `private_msg` (`to`,`from`,`date`,`subject`,`content`) VALUES ('$to ','$from ','$date ','$subject','$message')" missing opening '(' after VALUES
  11. good luck! if your topic is solved you can click the topic solved button at the bottom of the posts.
  12. use OR instead of AND
  13. you can use the mysql SUM function to do that very easily. clicky that tutorial explains using it very well
  14. http://www.tutorialized.com/view/tutorial/Simple-Chatbox-in-PHP-MySQL/23971 i just posted this in the other post.. im so confused. Im going to assume this is the post you will stay with. I suggest that you start with that, and try to get something simple working. then post here when you have problems with your code. You can get the most help here by actually posting some code you have a problem with, rather than asking for some code without even starting the project
  15. well then you should pick one post. here is a simple php/mysql chat tutorial. you are going to have to alter it to fit your table http://www.tutorialized.com/view/tutorial/Simple-Chatbox-in-PHP-MySQL/23971
  16. i guess you didn't like my suggestion in your first post. well then a few questions Do you have anything at all besides that login code. can you provide an example of how that session class is implemented? Do you have any idea where to start? And did you write that class yourself?
  17. phpopenchat click the download tab on the site?
  18. http://www.phpopenchat.org/ there is a start.
  19. oh totally didnt scroll over, nice catch
  20. check boxes that aren't checked don't get submit to the $_POST array you can do something like <input type='checkbox' class="" name='pooloptions[1]' value="one" />1 <input type='checkbox' class="" name='pooloptions[2]' value="two" />2 <input type='checkbox' class="" name='pooloptions[3]' value="three" />3 <input type='checkbox' class="" name='pooloptions[4]' value="four" />4 then you could do if (isset($_POST['pooloptions'][2])){ //do whatever }
  21. hmm then maybe there is something wrong with your PHP configuration, try echoing something before all the code, and see if it echos
  22. alright that seems fine. echo $sortby and see what you get
  23. if this is all the code you have, than that should work. it should at least display something (since you have your dies, and elses) Is there any more code?
  24. what you are using is an array. a good tutorial on arrays try doing it without quotes, IE echo $song[$sortby]; but I have a feeling your array isn't structred like you think it is. do a print_r($song) if it still doesn't work, and post the results
  25. thats why i asked if they were the same length. Also, you need to make sure the arrays aren't associative, because if so, the solution will be much more complicated
×
×
  • 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.