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]Accept/Decline

 
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: Sat Jul 05, 2008 1:12 pm    Post subject: [PHP]Accept/Decline Reply with quote

im making a list like this

Posted By: lolcats
Date:
Section:
Link:
ACCEPT DECLINE

and when you click accept it runs this

mysql_query("UPDATE `accounts` SET `pending` = 0 WHERE `by` = 'lolcats'");

but im wondering how to get the posted by, since I can't do $by = lolcats because I used mysql_query("SELECT * FROM `pending` WHERE `pending` = 1");

how would I get the name thing.. Theres gonna be multiple ones though.

Example:

Posted By: lolcats
Date:
Section:
Link:
[url="#"]ACCEPT[/url] [url="#"]DECLINE[/url]

Posted By: lolcats
Date:
Section:
Link:
[url="#"]ACCEPT[/url] [url="#"]DECLINE[/url]

Posted By: lolcats
Date:
Section:
Link:
[url="#"]ACCEPT[/url] [url="#"]DECLINE[/url]

Posted By: lolcats
Date:
Section:
Link:
[url="#"]ACCEPT[/url] [url="#"]DECLINE[/url]

Posted By: lolcats
Date:
Section:
Link:
[url="#"]ACCEPT[/url] [url="#"]DECLINE[/url]

Posted By: lolcats
Date:
Section:
Link:
[url="#"]ACCEPT[/url] [url="#"]DECLINE[/url]

_________________
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
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Jul 05, 2008 1:33 pm    Post subject: Reply with quote

Send a POST variable and if that variable is set to accept or decline then you run the query. I would also send a POST with the username and use that

if ( $_POST['variable'] == 'Accept' )
{
//do stuff
}
elseif ( #_POST['variable'] == 'Decline' )
{
//do stuff
}

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

Joined: 17 Dec 2006
Posts: 786

PostPosted: Sat Jul 05, 2008 1:39 pm    Post subject: Reply with quote

Not what I mean't.

OUTPUT would look like:

Name
lolcats ACCEPT DECLINE
butseks ACCEPT DECLINE
loldude ACCEPT DECLINE

if i click the one near lolcats, it needs a way to get "lolcats".

_________________
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
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Jul 05, 2008 2:53 pm    Post subject: Reply with quote

ElectroFusion wrote:
Not what I mean't.

OUTPUT would look like:

Name
lolcats ACCEPT DECLINE
butseks ACCEPT DECLINE
loldude ACCEPT DECLINE

if i click the one near lolcats, it needs a way to get "lolcats".


Make them pass "lolcats" to your handler.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Sat Jul 05, 2008 4:04 pm    Post subject: Reply with quote

Uhh.. What + how?
_________________
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
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