l0ve2hat3 Posted March 11, 2008 Share Posted March 11, 2008 Can someone point me in a direction where I can have someone send an email with a query to a mysql database and have it return the results?? Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/ Share on other sites More sharing options...
shocker-z Posted March 11, 2008 Share Posted March 11, 2008 An email to SQL?? Not really possible without running some kind of external process launch from outlook or somthing but even then you have to sent the email data to SQL. could you explain more of what your thinking please? regards Liam Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489445 Share on other sites More sharing options...
MadTechie Posted March 11, 2008 Share Posted March 11, 2008 i assume you mean output from an SQL database and send the results via email.. if so read up on mail() and mysql Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489449 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 Sure. Say I have a bank and I want my customers to be able to email or send a text containing the word "BALANCE" to an email address and from there I can get the customers email and what they want, transform that into an SQL statement "SELECT balance FROM account_info WHERE email='$customerEmail' ". Then send a email back with the balance. Chase Bank does this Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489451 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 what you mean is how do i use the mail function for php to send echoed results in html........ the processing of the code is done via the server and then echoed into a mail function with html then sent to the user that what you want.......... Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489457 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 it can all be done via sessions and mail function and a database but there no point lol, the reason for programming in php is to let the php do all the work on the server and if be post results to a user not get the mail function to do the querys for you that madness but a good thinking point for a programmer....... Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489460 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 So what your saying is goto a web site and login then ask for your balence, Then the web site emails that user with there balance.... well if so that all done with the users id in the url link off the sent email, they press that link from the email the link goes to the server pulls the users info out via that url session md5 and salted then sends them the info back to there email account.... That crazy when the user who loged in should off been able to read the balance there and then........ Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489465 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 well how ever I have to do it. can somone tell me how I can do this? an I in the wrong forum? should I be in the server section? Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489467 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 it stupid man but no your in the correct forum but where your code where here to help not program for you........ goto the freelance part off the forum to get someone else write it for you....... Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489470 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 lol nonono. I want the users to send a EMAIL to somebank@somebank.com with the word "BALANCE" in it and from there they recieve a EMAIL back with their balance. Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489472 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 That inpossable unless there logged into a web site to get the email sent to them..... well unsecure........ there no bank were i can send a word off balance as a email and my balance comes back as a email inpossable man... Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489473 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 wtf. i dont want you to write it for me. i want you to tell me a direction i should go in. Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489474 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 ill get well rich quick............ that means all hackers will hack those email address and get users balances no way inpossable man Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489479 Share on other sites More sharing options...
MadTechie Posted March 11, 2008 Share Posted March 11, 2008 insecure as hell.. i have a pinsentry to login to my bank account.. i need my bank card and my pin and then my online account number and password... your requires a email.... you can do it but your need to create a online mail client (without the interface) with a cron to check mail box.. Oh btw whats the name of this bank.. i need some extra cash! Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489482 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 please help am i going crazy where a bank has got the users ip address and cross match the ip to there account please tell me i am wrong............. Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489484 Share on other sites More sharing options...
MadTechie Posted March 11, 2008 Share Posted March 11, 2008 personally i doubt this is part of a bank system theirs too many holes!! but then again just returning a balanace isn't that bad.. well i mean it could be worse Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489489 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 OK YOU GUYS ARE LOSING ME. CHASE BANK LETS YOU REGISTER A CELL PHONE NUMBER ON THERE WEBSITE AFTER YOU LOGIN. OH AND BTW ITS ONLY YOUR BALANCE NOT UR ACCOUNT NUMBER, C'MON A LITTLE COMMON SENSE HERE AND IF YOU DONT KNOW A TEXT IS THE SAME AS AN EMAIL EX. 6315555555@VTEXT.COM (VERIZON CELLPHONE). NOW FROM THERE AFTER YOUR REGISTERED YOU CAN SEND A TEXT FROM YOUR PHONE WITH "BALANCE" AND RECIEVE A TEXT BACK WITH YOUR BALANCE. ALL I WANT IS SOMEONE TO POINT ME IN A DIRECTION. NOT WRITE THE CODE Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489495 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 Ok as a programmer this project is the bigist FLOOR ever discused it so bad it like saying goto a bank just enter your pin and your get your balance that stupid there a thing called a bank card......... i am not going to help anybody to craete a system were the user can get any deatals relating to there email address or there ip. yes it can be done but it such insecure i am not involved lol.... good luck your need it..... Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489498 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 well if it helps you sleep at night its not for a bank. im using that as an example. becuase i thought it would be easy for someone to understand Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489503 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 its actually for a service call managment system with the technicians would be able to text a email address and get the ticket information. Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489505 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 Now your asking a diffrent quistion. Your asking It as a mobile phone text not a email account.... That totaly diffrent............... if it a mobile phone that receves the balence off course it secure . It all down to the bank provider working with the mobile provider to secure the text... secure via sim and phone it self..... that not what you wanted from the begining............ Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489506 Share on other sites More sharing options...
shocker-z Posted March 11, 2008 Share Posted March 11, 2008 Not so much insecure as just totaly pointless. I can understand a text message, but when access the internet to log into your email to send an email to receive an email with your balance when you could just log into the site and click balance. If you really want to go ahead with it then you would have to look into using a mailserver with a mysql database (or another accessable database) and search through the emails on some sort of cron job for emails with balance in the subject. I read up about phones and this can be done on linux system by connecting an old nokia phone by database and text messages are stored in a MySQL databae and you would search that. still which ever way as said it is insecure and the email side of it is more work then just logging into your site and clicking on balance. EDIT: l0ve2hat3 I did use some sence and guess you wasn't a bank. but it was kind of a bad example lol regards Liam Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489507 Share on other sites More sharing options...
trq Posted March 11, 2008 Share Posted March 11, 2008 Firstly, you would need to look at using the imap extension in conjunction with a cronjob to check your mailbox for emails every few minutes. You would then need to parse the email (likely with preg_match) for the relevent information. From there, use that information to form an sql query, execute that query using mysql_query and its related functions. Once you have the data you require, concatinate it into a message and send it via mail. Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489508 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 thorpe your the man. perfect. all i was asking. thanks Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489512 Share on other sites More sharing options...
redarrow Posted March 11, 2008 Share Posted March 11, 2008 thorpe that so true but it got more holes then a hole........................... thorpe it floored man................ 1. you need to be the sole owner off the database server... 2. you need more band width then god got.... it just stupid man Do what thorpe said makes sence but issint secure i say Quote Link to comment https://forums.phpfreaks.com/topic/95607-mysql-queries-via-email/#findComment-489515 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.