Club Waddles Official Forum
Welcome To Club Waddles!
Club Waddles Official Forum
Welcome To Club Waddles!
Club Waddles Official Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Chat About All Things Club Waddles! The Latest News, Updates, Secrets & More!
 
HomeSearchLatest imagesRegisterLog in

 

 PHP & AS intergration URGETNT

Go down 
+2
Bod720
dj tad
6 posters
AuthorMessage
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 11:15 am

Hi,
I'm making a login. My code is correct but i get a response of incorrect details.
Back to top Go down
http://theultimatecpblog.wordpress.com
Bod720
ActionScript Coder
ActionScript Coder
avatar


Number of posts : 150
Age : 28
Location : United Kingdom
Infractions : 0, Zilch, Zero, Zip
Status : Alive. Not coding Club Waddles for a few days.
Registration date : 2009-01-28

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 11:57 am

More info KTHX
Back to top Go down
http://www.Bod720.co.nr
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:01 pm

ok,
i posted an kirupa forums and i got no answer, here is my very detailed post.
I have set everything server side and flash side. But when i open my project it says login details incorect. Oh, im making a loginif you haven't worked it out. Here are the codes I used. Some parts are just comments when I copied it off the kirupa website.
Action Script:
Submit button
//this will be the action to get your variables from the PHP
on (release, keyPress "<Enter>") {
//checks to see if there is something in both the name
//and password
if (user != "" && pass != "") {
status = "Searching database... Please wait";
//if you changed the php file name, change it here to!!
loadVariablesNum("klubkrab.netne.net/newlogin.php", 0, "POST");
}
}

Frame
stop();
//stops the movie on the login page
userinput.restrict = "a-zA-Z0-9";
passinput.restrict = "a-zA-Z0-9";
//this will make it so the user can't use symbols
//that could mess with your database
Selection.setFocus(userinput);
//this puts the cursor in the first box (thaks Kax!)
status = "Enter your information and submit";
//this enters in directions in your textbox called status
this.onEnterFrame = function() {
if (_root.checklog == 1) {
_root.gotoAndStop(2);
}
if (_root.checklog == 2) {
_root.gotoAndStop(3);
}
};
//the onEnterFrame constantly checks to see if the PHP
//script has sent the variable 'checklog' back to the
//movie and directs the people accordingly

PHP:
Php file (newlogin.php)

<?
//this pulls the variables from the flash movie when the user
//hits submit. Use this when your global variables are off.
//I don't know how to toggle global variables, so I just put
//it in all the time
$user=$_POST['user'];
$pass=$_POST['pass'];

//connect to database
if ($user && $pass){
mysql_pconnect("mysql8.000webhost.com","a2387414_"user,pass"") or die ("didn't connect to mysql");
mysql_select_db("a2387414_kk") or die ("no database");
//make query
$query = "SELECT * FROM auth WHERE username = '$user' AND userpassword = '$pass'";
$result = mysql_query( $query ) or die ("didn't query");

//see if there's an EXACT match
$num = mysql_num_rows( $result );
if ($num == 1){
print "status=Thanks for testing our login&checklog=1";
} else {
print "status=Incorrect details&checklog=2";
}
}
?>




All the files are uploaded to my server. If you have a solution please, please tell me. I'm making a game and flash is running out of trial time.
i took out my usernames and passwords
Back to top Go down
http://theultimatecpblog.wordpress.com
Bod720
ActionScript Coder
ActionScript Coder
avatar


Number of posts : 150
Age : 28
Location : United Kingdom
Infractions : 0, Zilch, Zero, Zip
Status : Alive. Not coding Club Waddles for a few days.
Registration date : 2009-01-28

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:07 pm

change this line: loadVariablesNum("klubkrab.netne.net/newlogin.php", 0, "POST");
to this: loadVariablesNum("http://klubkrab.netne.net/newlogin.php", 0, "POST");
Back to top Go down
http://www.Bod720.co.nr
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:08 pm

thanks
Back to top Go down
http://theultimatecpblog.wordpress.com
Bod720
ActionScript Coder
ActionScript Coder
avatar


Number of posts : 150
Age : 28
Location : United Kingdom
Infractions : 0, Zilch, Zero, Zip
Status : Alive. Not coding Club Waddles for a few days.
Registration date : 2009-01-28

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:10 pm

This line:
mysql_pconnect("mysql8.000webhost.com","a2387414_"user,pass"") or die ("didn't connect to mysql");

to this:
mysql_connect("mysql8.000webhost.com","a2387414_","user,pass") or die ("didn't connect to mysql");
Back to top Go down
http://www.Bod720.co.nr
Bod720
ActionScript Coder
ActionScript Coder
avatar


Number of posts : 150
Age : 28
Location : United Kingdom
Infractions : 0, Zilch, Zero, Zip
Status : Alive. Not coding Club Waddles for a few days.
Registration date : 2009-01-28

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:33 pm

why is this mysql8.000webhost.com a different place than you uploaded the php?
Back to top Go down
http://www.Bod720.co.nr
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:34 pm

ok,
ill try that. thanks for helping
Back to top Go down
http://theultimatecpblog.wordpress.com
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:34 pm

oh,
i'm told to use it by my host
Back to top Go down
http://theultimatecpblog.wordpress.com
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:37 pm

well, thats what i was told but you can never trust my host as its free (i know, i have php and all the new web features for free)
Back to top Go down
http://theultimatecpblog.wordpress.com
timelord14
Club Waddles Support
Club Waddles Support
timelord14


Number of posts : 143
Age : 25
Location : UK
Status : Trying to save cw with snooper and taddle
Registration date : 2009-02-01

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeTue May 05, 2009 12:46 pm

Bod720 wrote:
why is this mysql8.000webhost.com a different place than you uploaded the php?

Hey bod could u read me pm please
Back to top Go down
https://www.youtube.com/zoot107
Bod720
ActionScript Coder
ActionScript Coder
avatar


Number of posts : 150
Age : 28
Location : United Kingdom
Infractions : 0, Zilch, Zero, Zip
Status : Alive. Not coding Club Waddles for a few days.
Registration date : 2009-01-28

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeWed May 06, 2009 11:49 am

Back to top Go down
http://www.Bod720.co.nr
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeWed May 06, 2009 12:04 pm

ok
Back to top Go down
http://theultimatecpblog.wordpress.com
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeWed May 06, 2009 12:14 pm

still nothing
Back to top Go down
http://theultimatecpblog.wordpress.com
Rory
ActionScript Coder
ActionScript Coder
Rory


Number of posts : 1366
Age : 27
Location : India
Status : Changed my name to Rory
Registration date : 2009-02-06

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeWed May 06, 2009 8:02 pm

I can't understand anything!
Back to top Go down
http://www.pandanious.wordpress.com
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeThu May 07, 2009 1:15 am

i can kinda understand, not much. I'm new to actionscript
Back to top Go down
http://theultimatecpblog.wordpress.com
Rory
ActionScript Coder
ActionScript Coder
Rory


Number of posts : 1366
Age : 27
Location : India
Status : Changed my name to Rory
Registration date : 2009-02-06

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeThu May 07, 2009 1:28 am

taddle1 wrote:
i can kinda understand, not much. I'm new to actionscript
I'm new too!
Back to top Go down
http://www.pandanious.wordpress.com
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeFri May 08, 2009 1:22 pm

cool
Back to top Go down
http://theultimatecpblog.wordpress.com
bubba
Lengendary Duck
bubba


Number of posts : 1037
Age : 26
Location : Near DC
Status : Being awsome (like always). Ask to be my freind. I accept all request!
Registration date : 2009-04-19

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeFri May 08, 2009 2:08 pm

Ive never tried it. How does it work?
Back to top Go down
http://pondducks.forumotion.net/
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeSat May 09, 2009 2:26 am

well,
you open a program called flash. (It is a driver and designer software.) You add things that you want. Then, you click on actions and type in the code (usually quite easy) for the thing you want to happen. But when you get advanced like me you will want to use something called php. PHP is a free version of asp really. You either install it to your server or just get a host that supports it. You can use php if you have my sql. (make databases) For example, im making a login test. I have to make a table called Auth in a database. The php file would send flash to the database which would have passwords and usernames. Thats all for now.

Crying or Very sad

But dont worry, ill be back with some more things later
Back to top Go down
http://theultimatecpblog.wordpress.com
Gamerboy
Store Worker
Gamerboy


Number of posts : 40
Status :
Registration date : 2009-03-30

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeSat May 09, 2009 2:59 am

Erm, you guys are still using the LoadVariables method? Though it is fairly simple to start out with, for a proper game you are probably better off using sockets, SmartFoxServer or similar.
Back to top Go down
dj tad
GRUB Manager
dj tad


Number of posts : 160
Status : Coding newsite
Registration date : 2009-02-05

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeSat May 09, 2009 6:21 am

we havent bought it yet
Back to top Go down
http://theultimatecpblog.wordpress.com
bubba
Lengendary Duck
bubba


Number of posts : 1037
Age : 26
Location : Near DC
Status : Being awsome (like always). Ask to be my freind. I accept all request!
Registration date : 2009-04-19

PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitimeThu May 14, 2009 1:46 pm

Complicated...
Back to top Go down
http://pondducks.forumotion.net/
Sponsored content





PHP & AS intergration URGETNT Empty
PostSubject: Re: PHP & AS intergration URGETNT   PHP & AS intergration URGETNT Icon_minitime

Back to top Go down
 
PHP & AS intergration URGETNT
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Club Waddles Official Forum :: Programming :: Coding-
Jump to: