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]Code Snippets

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 12, 2008 12:01 am    Post subject: [PHP]Code Snippets Reply with quote

I'll be posting all of my code snippets here. I'm taking requests.

Very Easy
* Mathematics
Code:
<html>
<head>
<title>Mathematics</title>
</head>
<body>
<strong>Proper to improper fraction</strong>
<form name="form1" method="post" action="mathematics.php">
Whole Number:<input type="text" name="num1" /><br />
Numerator:<input type="text" name="num2" /><br />
Denominator:<input type="text" name="num3" /><br />
<input type="submit" value="calculate" />
</form>

<strong>Multiplication</strong>
<form name="form2" method="post" action="mathematics.php">
First Number:<input type="text" name="mnum1" /><br />
Second Number:<input type="text" name="mnum2" /><br />
<input type="submit" value="calculate" />
</form>
<?php
if($_POST['num1'])
{
 $num1 = $_POST['num1'];
 $num2 = $_POST['num2'];
 $num3 = $_POST['num3'];
 $num4 = $num1 * $num3 + $num2;
 $result = "<br />" . $num4 . " over " . $num3;
 echo $result;
}
if($_POST['mnum1'])
{
 $mnum1 = $_POST['mnum1'];
 $mnum2 = $_POST['mnum2'];
 $mnum3 = $mnum1 * $mnum2;
 $res = "<br />" . $mnum3;
 echo $res;
}
 ?>

</body>
</html>


Request as much as you want, because I wanna fill up on scripts. Very Happy

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Fri Dec 12, 2008 8:52 am    Post subject: Reply with quote

Sorry, but this is something you learn on the first day when you're learning php.
Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 12, 2008 9:50 am    Post subject: Reply with quote

I know that. Plus I know PHP very well. [(I made my own board like vBulletin)]. I said i'm taking REQUESTS though.
_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Fri Dec 12, 2008 10:16 am    Post subject: Reply with quote

ok heres a request.

Create a php submission form, which sends the data to mysql or access
Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 12, 2008 10:35 am    Post subject: Reply with quote

@SXGuy, I kind of forgot mysql, so the $query is "I forgot."

Code:

<html>
<head><title>Untitled Crap</title>
</head>
<body>
<?php
if(!$_POST['name']){ ?>
<form name="form1" method="post" action="index.php">
Naem plz: <input type="text" name="name" /><br />
Aeg plz: <input type="text" name="age" /><br />
<input type="submit" value="register" />
<?php
}else{
$name = $_POST['name'];
$age = $_POST['age'];
$mysql_host = "your_host";
$mysql_user = "your_user";
$mysql_pass = "your_pass";
$mysql_db = "your_db";
$connect = mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die(mysql_error());
$dbconnect = mysql_select_db($mysql_db, $connect) or die(mysql_error());
$query = "forgot mysql.";
$res = mysql_query($query) or die(mysql_error());
echo 'your account has been made.';
}
?>
</body>
</html>

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
p99
Master Cheater
Reputation: 0

Joined: 21 Jan 2007
Posts: 271

PostPosted: Fri Dec 12, 2008 1:11 pm    Post subject: Reply with quote

Filter the input >.<

How about an authentication script utilizing flash cookies?

_________________
Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Fri Dec 12, 2008 2:20 pm    Post subject: Reply with quote

p99, what you want is here: http://blog.circlecube.com/2008/04/tutorial/shared-object-utilizing-the-flash-cookie/

scroll down to find it.

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
Spawnfestis
GO Moderator
Reputation: 0

Joined: 02 Nov 2007
Posts: 1746
Location: Pakistan

PostPosted: Sat Dec 13, 2008 1:54 pm    Post subject: Reply with quote

ElectroFusion wrote:
I know that. Plus I know PHP very well. [(I made my own board like vBulletin)]. I said i'm taking REQUESTS though.

Dude will you ever give it up? Confused
Go fuck yourself, and take your trolling elsewhere. Everyone knows you do not know anything, stop making yourself look bigger than you are, this is not a place to gain fans nor achieve a larger e-penis, please, stick to the maplestory forum - faggot.

Thanks. Rolling Eyes

_________________

CLICK TO HAX MAPLESTORAY ^ !!!!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Sun Dec 14, 2008 6:22 am    Post subject: Reply with quote

i gotta admit, every request thats been written, is just a template ive seen in other places, maybe variables have been changed but thats it lol
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Dec 14, 2008 9:59 am    Post subject: Reply with quote

SXGuy wrote:
i gotta admit, every request thats been written, is just a template ive seen in other places, maybe variables have been changed but thats it lol


Im not saying EF knows what he's doing, but alot of php is pretty much the same code. There's only a few ways to do things sometimes.

_________________
Back to top
View user's profile Send private message
torpin005
Master Cheater
Reputation: 0

Joined: 19 Nov 2007
Posts: 255

PostPosted: Sun Dec 14, 2008 12:57 pm    Post subject: Reply with quote

Can you send me your forumt hign?
_________________


Go check it out. Good Hacks
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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