We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,627 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to code services in wordpress?

See am doing an android application,it has a web back end,am using wordpress,but how can i code web services in wordpress?suppose i need to fetch some contents from database and pass it as json to android phones.So where should i place the php script or how can i do this?Is it possible to do web services using wordpress?

Here is the code:

$select_qry="select * from admin_details where username='$uname' and  password='$paswd'";
$result=mysql_query($select_qry);
$rows=mysql_num_rows($result);
if($rows>0)
$admin_arr=mysql_fetch_assoc($result);
json_encode($admin_arr);

How can i do this in wordpress?

Please help me..

Thanks

2
Contributors
1
Reply
7 Hours
Discussion Span
1 Year Ago
Last Updated
2
Views
youvi
Light Poster
27 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

i think you can not do it,
because the database you are fetching is not on wordpress server, so register on any webhost and create here database then upload your php file on that server.

technoknol
Light Poster
43 posts since Feb 2012
Reputation Points: 10
Solved Threads: 2
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0579 seconds using 2.7MB