Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


PHP help
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Tue Dec 13, 2011 9:48 pm    Post subject: PHP help Reply with quote

<html>
<body>
<?php
$communism=("failure");
if ($communism=="fail"); echo "Hey!";

else {
echo "Error!";

?>
</body>
</html>

What's wrong with this? Else seems to be unexpected.

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
.....
Expert Cheater
Reputation: 59

Joined: 23 Oct 2010
Posts: 119

PostPosted: Tue Dec 13, 2011 9:49 pm    Post subject: Re: PHP help Reply with quote

Athostle/Rokurai wrote:
<html>
<body>
<?php
$communism=("failure");
if ($communism=="fail"); echo "Hey!";

else {
echo "Error!"

?>
</body>
</html>

What's wrong with this? Else seems to be unexpected.


are you not required a closing }?
Back to top
View user's profile Send private message
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Tue Dec 13, 2011 9:49 pm    Post subject: Reply with quote

failure and fail
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Tue Dec 13, 2011 9:51 pm    Post subject: Reply with quote

Cryoma wrote:
failure and fail

Yeah, that's there on pupose. I'm trying to get it to say Error if it can't get the value. (Don't spoonfood if you're gonna help, guys, I need to be taught.)

Parse error: syntax error, unexpected T_ELSE in /private/var/www/index.php on line 7

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Tue Dec 13, 2011 9:55 pm    Post subject: Reply with quote

<?php
$communism=("failure");
if ($communism=="fail")
echo "Hey!";
else
echo "Error!";
?>
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Tue Dec 13, 2011 10:01 pm    Post subject: Reply with quote

Cryoma wrote:
<?php
$communism=("failure");
if ($communism=="fail")
echo "Hey!";
else
echo "Error!";
?>

Two mistakes by me? Not bad. Thanks.

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
InternetIsSeriousBusiness
Grandmaster Cheater Supreme
Reputation: 8

Joined: 12 Jul 2010
Posts: 1268

PostPosted: Tue Dec 13, 2011 10:05 pm    Post subject: Reply with quote

Atleast Adam is actually trying to learn something.
_________________
FLAME FLAME FLAME!!!@@@
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Wed Dec 14, 2011 8:30 am    Post subject: Reply with quote

My first PHP script!
http://storageserver.x10.mx/test.php

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
.....
Expert Cheater
Reputation: 59

Joined: 23 Oct 2010
Posts: 119

PostPosted: Wed Dec 14, 2011 9:07 am    Post subject: Reply with quote

Athostle/Rokurai wrote:
My first PHP script!


Very nice! I'm in the process of learning JavaScript now that I realized HTML is basically a cheat sheet language.
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Wed Dec 14, 2011 9:42 am    Post subject: Reply with quote

Effect wrote:
Athostle/Rokurai wrote:
My first PHP script!


Very nice! I'm in the process of learning JavaScript now that I realized HTML is basically a cheat sheet language.

PHP is tough but fun, I suggest you try to learn that. I just did a quick read 30 minute read of the HTML tutorials, just to remember the basics. If you really want to make a flashy website, try AS3 like Cryoma said, you can embed the SWF (Shockwave Flash) file in HTML.

Also, updated the website.



blagh.png
 Description:
 Filesize:  8.96 KB
 Viewed:  3141 Time(s)

blagh.png



_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
shitposter
Newbie cheater
Reputation: 5

Joined: 12 Nov 2008
Posts: 13

PostPosted: Wed Dec 14, 2011 11:43 am    Post subject: Reply with quote

php is not 'tough'
Back to top
View user's profile Send private message
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Wed Dec 14, 2011 11:58 am    Post subject: Reply with quote

PHP is a 'handy' programming language, as it allows you to do a lot. This unfortunately also includes mistakes. Prime example is:

Code:
<?php
  $i = true;
  if($i) {
     $variable = "OMG I'M GOING TO ECHO NOW!";
  }
  echo $variable;
?>


Real programmers will know why this will fail in every other programming language, but only throws a warning in PHP, or nothing if you have error reporting set to nothing.


EDIT: Also, if I ever notice any of you post PHP code with the '@' in it, I will come to your house, and beat you to death with a stick.
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Wed Dec 14, 2011 12:33 pm    Post subject: Reply with quote

xTremist wrote:
php is not 'tough'

When learning, it can be. I had pointed that message at him because he'd be learning.
@Augustine:

Code:
<html>
<body>

<?php
$somevar="@ @ @ @ @ @ @ @ @ @ @ @ @ @ @";
     echo ("$somevar");
?>
<br />
<img src="http://www.nationstates.net/images/flags/uploads/trollface_x__861729.png" border="0" />
</body>
</html>

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Wed Dec 14, 2011 12:36 pm    Post subject: Reply with quote

Athostle/Rokurai wrote:
xTremist wrote:
php is not 'tough'

When learning, it can be. I had pointed that message at him because he'd be learning.
@Augustine:

Code:
<html>
<body>

<?php
$somevar="@ @ @ @ @ @ @ @ @ @ @ @ @ @ @";
     echo ("$somevar");
?>
<br />
<img src="http://www.nationstates.net/images/flags/uploads/trollface_x__861729.png" border="0" />
</body>
</html>

Echo doesn't require (), so if you were implying that was the error I mentioned, then no. Also, you are echo'ing a variable, so why put quotes around it? Correct method of displaying it would be:

Code:
echo $somevar;
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Wed Dec 14, 2011 12:39 pm    Post subject: Reply with quote

Augustine wrote:
Athostle/Rokurai wrote:
xTremist wrote:
php is not 'tough'

When learning, it can be. I had pointed that message at him because he'd be learning.
@Augustine:

Code:
<html>
<body>

<?php
$somevar="@ @ @ @ @ @ @ @ @ @ @ @ @ @ @";
     echo ("$somevar");
?>
<br />
<img src="http://www.nationstates.net/images/flags/uploads/trollface_x__861729.png" border="0" />
</body>
</html>

Echo doesn't require (), so if you were implying that was the error I mentioned, then no. Also, you are echo'ing a variable, so why put quotes around it? Correct method of displaying it would be:

Code:
echo $somevar;


Code:
<html>
<body>

<?php
$somevar="@ @ @ @ @ @ @ @ @ @ @ @ @ @ @";
     echo "$somevar";
?>
<br />
<img src="http://www.nationstates.net/images/flags/uploads/trollface_x__861729.png" border="0" />
</body>
</html>


I'm getting a bit mixed up, sorry about that.
Also, my point was:
Quote:

EDIT: Also, if I ever notice any of you post PHP code with the '@' in it, I will come to your house, and beat you to death with a stick.
http://storageserver.x10.mx/Stg/

I was trying to be clever. ;_;

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites