nht3004 Posted May 6, 2009 Share Posted May 6, 2009 How can I connect to the online databases (SQL and PHPAdmin I meant) For example, I want to get data from online table `userID` `userPass` in `userDataBase` at www.somehost.something.anything, what should I do I have thought about the way to use PHP to create the HTML Source "True" or "False", for instance, www.somehost.com/login.php?id=nht3004&password=nht3004 will return "True" if the log in information is true and "False" otherwise. But in that way, my program is TOO VULNERABLE! Help me plz for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Bert Posted May 6, 2009 Share Posted May 6, 2009 How can I connect to the online databases (SQL and PHPAdmin I meant)For example, I want to get data from online table `userID` `userPass` in `userDataBase` at www.somehost.something.anything, what should I doI have thought about the way to use PHP to create the HTML Source "True" or "False", for instance, www.somehost.com/login.php?id=nht3004&password=nht3004 will return "True" if the log in information is true and "False" otherwise. But in that way, my program is TOO VULNERABLE!Help me plz Have you searched the forum yet? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
nht3004 Posted May 6, 2009 Author Share Posted May 6, 2009 (edited) Have you searched the forum yet?Yes but a lot of topics , I don't know which satisfies my request And many of them I can't use, example $sql = _MySQLConnect("root", "", "database_name", "localhost") ;CHANGE LOGIN LOCATION and credentials If NOT @error Then $query = ("Select * FROM database_name ;");blah blah blah sql statement $result = $sql.execute($query) If NOT @error Then FileWrite($file, $query) ;write it to a file and do whatever else you need to do with it EndIf _MySQLEnd($sql) EndIf Edited May 6, 2009 by nht3004 for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Bert Posted May 6, 2009 Share Posted May 6, 2009 http://www.autoitscript.com/forum/index.ph...;hl=SQL+connect The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
nht3004 Posted May 6, 2009 Author Share Posted May 6, 2009 (edited) http://www.autoitscript.com/forum/index.ph...;hl=SQL+connectThanks for your reply, I've try but I always get this messageError opening file sql.au3!Help! Edited May 6, 2009 by nht3004 for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Bert Posted May 6, 2009 Share Posted May 6, 2009 then you are doing it wrong. How you are doing it wrong is anyone's guess. We would need to see your code to see what you are doing wrong. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
nht3004 Posted May 6, 2009 Author Share Posted May 6, 2009 then you are doing it wrong. How you are doing it wrong is anyone's guess. We would need to see your code to see what you are doing wrong.Here is my code: #include <_sql.au3>; $sql=_SQL_Connect(-1, "localhost","SM", "root", "vertrigo") $result=_SQL_Execute(-1,"Select * FROM SM "); MsgBox($result); _SQL_End($sql); An _sql.au3 I get from http://www.autoitscript.com/forum/index.ph...;hl=SQL+connect It prompts an error of _sql.au3 function! for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Bert Posted May 6, 2009 Share Posted May 6, 2009 Did you read the ENTIRE THREAD I sent you? It speaks of this. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
ChrisL Posted May 6, 2009 Share Posted May 6, 2009 (edited) Your not even using it right. #include <_sql.au3>; #include <Array.au3> _SQL_Startup() _SQL_RegisterErrorHandler() If _SQL_Connect(-1, "localhost","SM", "root", "vertrigo") = $SQL_ERROR then Msgbox(0 + 16 +262144,"Error",_SQL_GetErrMsg()) Local $aResult,$iRows,$iColumns _SQL_GetTable2D(-1,"Select * FROM SM",$aResult,$iRows,$iColumns); If @error then Msgbox(0,"",_SQL_GetErrMsg()) Else _ArrayDisplay($aResult) EndIf _SQL_Close() Edited May 6, 2009 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
nht3004 Posted May 6, 2009 Author Share Posted May 6, 2009 Your not even using it right. #include <_sql.au3>; #include <Array.au3> _SQL_Startup() _SQL_RegisterErrorHandler() If _SQL_Connect(-1, "localhost","SM", "root", "vertrigo") = $SQL_ERROR then Msgbox(0 + 16 +262144,"Error",_SQL_GetErrMsg()) Local $aResult,$iRows,$iColumns _SQL_GetTable2D(-1,"Select * FROM SM",$aResult,$iRows,$iColumns); If @error then Msgbox(0,"",_SQL_GetErrMsg()) Else _ArrayDisplay($aResult) EndIf _SQL_Close()I still stuck, boohoo, it always shows that "Query Error" and "Connection Error" even I check the syntax right in PHP T.T, fix this for me! My database : SM Username : root Password: Vertrigo Host: Localhost for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
ChrisL Posted May 6, 2009 Share Posted May 6, 2009 In your first post you specified the database was remote not local, therfore are you sure it is localhost as the location? Second is it definately an MSSQL server and not MySQL? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted May 6, 2009 Share Posted May 6, 2009 Something else your database is called SM and your doing a select from a table called SM. Is that correct, you have a table called SM inside a database also called SM? Can you post the php code that you say works ok? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now