php - calling database to check for errors in a web app -


i'm building web app check errors in our mobile app has web interface. i'm having trouble calling database through php. in mobile app called in objective c by:

-(bool)login:(nsstring *)username password:(nsstring *)password{  // create new sbjson parser object nsstring * passwordtoserver = [self sha1:[nsstring stringwithformat:@"removed security", password]]; nsstring * authtoken = [self sha1:[nsstring stringwithformat:@"%@%@%@", securestring, username, passwordtoserver]]; nsdata* data = [nsdata datawithcontentsofurl:                 [nsurl urlwithstring:[nsstring stringwithformat:@"%@/%@%@", serverurl, @"api/login/", authtoken]]]; // json nsstring nsdata response nsstring *json_string = [[nsstring alloc] initwithdata:data encoding:nsutf8stringencoding]; if([json_string isequal:@"error"]){     loggedin = false;     return false; } else{     //get campagns 

how call server using php if have serverurl, securestring , passwordtoserver?

i've tried using doesn't seem work:

<?php mysql_connect("mydatabaseurl", "securestring", "passwordtoserver") or die(mysql_error());  ?> 

i think mobile app you're looking @ client side application talks server application connects database (judging login url , authtoken). looks you're writing php server application, means need know mysql database server information mobile app's server application using.


Comments

Popular posts from this blog

Need help in packaging app using TideSDK on Windows -

java - Why does my date parsing return a weird date? -

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -