Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
That's not what I asked but w/e. What's the correct full path to the includes folder? Please post it.
-
Anything. FTP, SSH, whatever you're using to view the directories.
-
muffin, please answer the question. All you have to do is successfully navigate to the includes directory with the path that came with the error. Try to find this EXACT path: /home/content/s/c/t/sctfaery/html/includes If you can't then you're calling the includes incorrectly...
-
Are you positive this is the path to your includes folder? /home/content/s/c/t/sctfaery/html/includes
-
No muffin. Can you post the FULL path to the include file, and the FULL path of the PHP file you're calling it from?
-
No, in fact PHP is pre-processed to be rendered as HTML to the browser. There is no question transitioning from static HTML to PHP is a good choice, especially if you want to add anything dynamic to your sites. If you're new to PHP then I would suggest reading tutorials from www.php.net.
-
Well say the file you're calling the requires is in: /usr/local/blah.com/main/current_page.php Now when you call, "../includes" it goes back a dir, and into include. So now we're in: /usr/local/blah.com/main/includes Then in that directory you're looking for "header.php". Is that where it is, relatively?
-
Can we see the relative code?
-
[SOLVED] SUMming variables through different iterations of a WHILE loop?
Maq replied to woolyg's topic in PHP Coding Help
Why can't you just use SUM() in your query? I also don't know why you're grabbing player_id from this query, putting it in a variable then running a while loop when you can just JOIN the two tables together. -
Ah, ok, the reason I asked is because technoViking isn't a very common name lol. Glad it works, it's always the little things that throw you off. If this is solved you can click the [sOLVED] tab at the bottom
-
Easy Question: How is the correct way to lay out PHP code?
Maq replied to johnsmith153's topic in PHP Coding Help
Oh, sorry. Sure you can do that, there are multiple ways to display raw HTML. 1) Break out of PHP. 2) Use HEREDOC. 3) Echo it out. 4) There are probably more but I can't think of any. -
You're probably going to pound your head against the wall, cause I just did. Change this line to: print $value->toString() . " "; BTW: Are you TechnoViking from Ubuntu forums? Oh and sorry for the delayed response, I went to the gym
-
Sorry, break; was for future reference, it will break out of a loop rather than exit the whole script. I meant use else. If the the IF statement are not true, then execute the query. If I'm understanding your problem correctly then this should work: if($player->energy { echo" You dont have any energy left"; exit; } else { $query = $db->execute("update `players` set `energy`=?, `awake`=?, `strength`=?, `total`=? where `id`=?", array($player->energy - $player->energy, $player->awake - $awakeloss, $player->strength + $statgain, $player->total + $statgain, $player->id )); }
-
I'm not seeing any blatant issues with your code. It seems to me that you're creating and returning the array of objects correctly. One thing I noticed, in your toString() method, you should use $this before all of your variables that are being returned. I assume you have error_reporting() set on max: ini_set ("display_errors", "1"); error_reporting(E_ALL); What version of PHP are you using?
-
Use an else so the query only gets executed if the statement isn't true, rather than just stopping the entire script. Instead of using "exit;" you could alternatively use "break;".
-
That's why you should only post the relevant code. I don't think anyone is going to sit and go through all your code... The most help we can give you is to read the debugging tutorial Mchl provided you in your other post and add these lines right after your first opening <?php tag: ini_set ("display_errors", "1"); error_reporting(E_ALL);
-
[SOLVED] can someone help me with one line of php???? PLEASE
Maq replied to skippa's topic in MySQL Help
Well if you just created it how is it supposed to have data in it? -
}; You have an extra ';' here.
-
[SOLVED] can someone help me with one line of php???? PLEASE
Maq replied to skippa's topic in MySQL Help
Probably cause there's nothing in the 'poker' column yet. -
[SOLVED] can someone help me with one line of php???? PLEASE
Maq replied to skippa's topic in MySQL Help
I think it's, DB >> table_name >> OPERATION tab, then add your table. -
[SOLVED] can someone help me with one line of php???? PLEASE
Maq replied to skippa's topic in MySQL Help
You can easily create one through such web apps like, "PHPMyAdmin". Or, you can do it the old fashioned way: ALTER TABLE users ADD poker VARCHAR(60); -
[SOLVED] can someone help me with one line of php???? PLEASE
Maq replied to skippa's topic in MySQL Help
Yeah, what is it? The "or die(mysql_error())" should kill the script and output a more "descriptive" error message. -
[SOLVED] can someone help me with one line of php???? PLEASE
Maq replied to skippa's topic in MySQL Help
Add this in and see what it outputs: return mysql_fetch_array(mysql_query("SELECT p.*, u.poker, u.money FROM poker p left join users u on (u.username='{$_SESSION['username']}') WHERE p.id=u.poker") or die(mysql_error())); -
You have to use COUNT() and GROUP BY to accomplish this.