-
Posts
2,965 -
Joined
-
Last visited
Everything posted by mikesta707
-
[SOLVED] header() function help in login.php
mikesta707 replied to netpumber's topic in PHP Coding Help
oh shit lol, my bad I meant @ signs. Always mess those up -
[SOLVED] header() function help in login.php
mikesta707 replied to netpumber's topic in PHP Coding Help
did you remove the ampersands? -
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
-
[SOLVED] header() function help in login.php
mikesta707 replied to netpumber's topic in PHP Coding Help
remove all your ampersands, and set error handling to just E_ALL. Ampersands suppress warnings and errors -
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.
-
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
-
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
-
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
-
[SOLVED] Need help with simple members chat!
mikesta707 replied to DiscoTrio's topic in PHP Coding Help
good luck! if your topic is solved you can click the topic solved button at the bottom of the posts. -
use OR instead of AND
-
you can use the mysql SUM function to do that very easily. clicky that tutorial explains using it very well
-
[SOLVED] Need help with simple members chat!
mikesta707 replied to DiscoTrio's topic in PHP Coding Help
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 -
[SOLVED] Creating a mysql backend chat room. Loggin already made.
mikesta707 replied to DiscoTrio's topic in PHP Coding Help
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 -
[SOLVED] Need help with simple members chat!
mikesta707 replied to DiscoTrio's topic in PHP Coding Help
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? -
[SOLVED] Creating a mysql backend chat room. Loggin already made.
mikesta707 replied to DiscoTrio's topic in PHP Coding Help
phpopenchat click the download tab on the site? -
[SOLVED] Creating a mysql backend chat room. Loggin already made.
mikesta707 replied to DiscoTrio's topic in PHP Coding Help
http://www.phpopenchat.org/ there is a start. -
oh totally didnt scroll over, nice catch
-
[SOLVED] Checking to see if checkbox option was checked or not?
mikesta707 replied to galvin's topic in PHP Coding Help
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 } -
hmm then maybe there is something wrong with your PHP configuration, try echoing something before all the code, and see if it echos
-
alright that seems fine. echo $sortby and see what you get
-
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?
-
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
-
Displaying Values of an Array in Table
mikesta707 replied to surajkandukuri's topic in PHP Coding Help
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