• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by vikhi · Apr 03, 2013 at 06:24 AM · wwwwwwform

WWW.Addformfield posts only some values

Im working on posting data to a Php server . I need to convert the following code in php to Unity3d

 Php code:
 
 $data = 'method="user.friends"&user_id="25452"&startLimit="0"&endLimit="10"&session_id="'.$session.'"';

 Equivalent Unity Code:
 form=new WWWForm();
 form.AddField("method","user.friends");
 form.AddField("user_id","25452");
 form.AddField("startLimit","0"); 
 form.AddField("endLimit","10");
 form.AddField("session_id","p77jy8rYmKjjlIWL6rjfi3eEfq_rmId2toI");
 var www= new WWW(url,form);
 yield www;

Im getting output in server log as

 Input method name: user.friends
 ----------------------End-------------------------------------------------------------------------------------------- 
 ----------------------Started on Wednesday 3rd 2013f April 2013 11:19:04 AM---------------------------------------- 


But I need output in server log as

 ----------------------Started on Tuesday 2nd 2013f April 2013 04:38:41 PM---------------------------------------- 
 Input method name: "user.friends"
  INFO: Details user.friends
  INFO: Details "25452"
  INFO: Details "0"
  INFO: Details "10"
  INFO: Details "p77jy8rYmKjjlIWL6rjfi3eEfq_rmId2toI"
 ----------------------Output Responds-------------------------------------------------------------------------------------------- 
  INFO: Details {"#error":false,"#data":[{"user_id":"9","sap_code":"51342637","loginname":"chandra-pandey","user_first_name":"Chandra","user_last_name":"Pandey","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-9-2972311734340325.jpg"},{"user_id":"20","sap_code":"10101925","loginname":"suyambunathang","user_first_name":"suyambunathan","user_last_name":"gopal","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-20-8135731720047719.jpg"},{"user_id":"26","sap_code":"40181928","loginname":"narmadhas","user_first_name":"Narmadha ","user_last_name":"Sivakumar","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-26-6499581367306672.jpg"},{"user_id":"33","sap_code":"40170838","loginname":"girija_s","user_first_name":"Girija","user_last_name":"S","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-33-819058527544453.jpg"},{"user_id":"34","sap_code":"40167217","loginname":"vimalraj.r","user_first_name":"Vimal ","user_last_name":"raj","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-34-8038401155937996.gif"},{"user_id":"35","sap_code":"40170819","loginname":"devarajanm","user_first_name":"\u00d0\u212f\u2665\u03b1\u0491\u03b1\u029d\u03b1\u03b7","user_last_name":"\u2133\u03b1\u03b7\u0457","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-35-7174682064982910.jpg"},{"user_id":"36","sap_code":"40190476","loginname":"agalya.a","user_first_name":"@g@!Y@","user_last_name":"Aruchamy","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-36-3369571695332413.jpg"},{"user_id":"39","sap_code":"51324459","loginname":"saranya.b","user_first_name":"Saranya ","user_last_name":"BS","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-39-225847594768355.jpg"},{"user_id":"52","sap_code":"51331022","loginname":"rgopi","user_first_name":"Gopi","user_last_name":"Ramanuajam","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-52-9270971533467329.jpg"},{"user_id":"54","sap_code":"51335299","loginname":"sridhar.suresh","user_first_name":"Sridhar","user_last_name":"Suresh","user_photo_url":"http:\/\/10.98.12.54\/sandbox\/sites\/default\/files\/pictures\/picture-54-3737981865142086.jpg"}]}
 ----------------------EndResponds-------------------------------------------------------------------------------------------- 


Can anyone help me as why form.addfield posts only method name correctly and other fields are not posted?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WWWForm.Addfield not able to post data to server 1 Answer

Content-Length mismatch: Request Header indicated x bytes, but client sent 0 bytes. 0 Answers

Data pass using POST method - WebRequest object 1 Answer

How to upload/download video from/to mobile 1 Answer

Handle Blank Response From Web Server 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges