nichata Posted March 1, 2012 Posted March 1, 2012 (edited) is it possible make with autoit a regist system which someone put in inputbox username and pw, and then it regist to a mysql-database? Is there any example? :/ Edited March 1, 2012 by nichata
DelStone Posted March 1, 2012 Posted March 1, 2012 What is a "regist system"? Your question is a little unclear - if you want to access a mysql database you'll need a UDF library like MySQL.au3. Do a search on the forums and you'll find instructions of how to connect to a database using function calls in the library. Here's some code I use to initialise a mysql database #include <MySQL.au3> _MySQL_InitLibrary() If @error Then Exit MsgBox(0, "Database Error", "Could not initialise MySQL library [" & _MySQL_Error($Sql) & "]") $Sql = _MySQL_Init() If @error Then Exit MsgBox(0, "Database Error", "Could not initialise MySQL connection [" & _MySQL_Error($Sql) & "]") If _MySQL_Real_Connect($Sql, $SqlHost, $SqlId, $SqlPwd) = 0 Then Exit MsgBox(16, 'MySQL Connection Error', _MySQL_Error($Sql)) Query($Sql, "SET GLOBAL WAIT_TIMEOUT=7786800") _MySQL_Real_Query($Sql, "SHOW DATABASES") ; If abc database does not exist, create it $res = _MySQL_Store_Result($Sql) $arr = _MySQL_Fetch_Result_StringArray($res) If _ArraySearch($arr, "abc") = -1 Then _MySQL_Real_Query($Sql, "CREATE DATABASE abc") _MySQL_Real_Query($Sql, "USE abc") ; If no tables or a table has been deleted... $no_of_tables = CountTables($Sql) - 1 If $no_of_tables < $TotalTables Then SplashTextUpdate(35, "Recreating tables...") CreateDatabase() EndIf
Mechaflash Posted March 1, 2012 Posted March 1, 2012 Googling "autoit mysql", the first 3 links seem informational enough to start you off. And it looks like you already know what function to use (InputBox) so there ya go. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
nichata Posted March 1, 2012 Author Posted March 1, 2012 I will try clear my question. I wanna make a program,which you put a username and password.Then the program write to a mysql database the username and pw,so someone can login with the user.
Mechaflash Posted March 1, 2012 Posted March 1, 2012 you basically just want to make a GUI with AutoIT to login to a mysql database... or do you want to store the credentials, and have AutoIT send them to MySQL to automatically log in? Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
nichata Posted March 1, 2012 Author Posted March 1, 2012 I wanna make a regist system.Someone will enter a username & pw and it will be written to a mysql server.Then the user can login everytime to the program. I was also thinking about make a php file,which u write username and pw and it write it in php.I got a login system with php,but not a regist system
MPHillier Posted March 3, 2012 Posted March 3, 2012 My understanding of what is being asked... 1. User creates an account - Stored in MySql. 2. User logs in using a front end connected to Mysql to verify credentials - then runs? Is this a database program with MySql... Bounce credentials off one table to access another? I Break and Fix things... If the surf is up I'm outta here.....
MPHillier Posted March 3, 2012 Posted March 3, 2012 Or, what I do is use Active Directory credentials to access a Mysql database. Sign inOut program. I Break and Fix things... If the surf is up I'm outta here.....
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