Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 D3tona · Mar 16, 2015 at 01:27 AM · c#error

WWWform on Unity Web Player vs Browsers

i'm using PHP and c# on Unity Web Player 5.0.0f4... so i have this...

     ...
     WWWForm form = new WWWForm ();
     form.AddField ("func", "login");
     form.AddField ("username", l);
     form.AddField ("password", s);

     WWW webRequest = new WWW(URL_funcaomdan,form);
     yield return webRequest;
     ...


and PHP:

 $func = $_POST['func'];


This work fine on Opera, Chrome... but on IE and Firefox the PHP can't get the form field named "func".

obviously return on log "Notice: Undefined index: func in /home/xxx/public_html/xxx/unity_func.php"

know some fix?

Comment
Add comment · Show 4
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
avatar image Eluate · Mar 16, 2015 at 05:41 AM 0
Share

Does it successfully get username and password?

avatar image D3tona · Mar 16, 2015 at 04:09 PM 0
Share

no, using IE and Firefox i cant get username or password too... the unity Request the page, but cant send the fields =/

if unity are sending the browser are blocking this field for some security reason.

:S

avatar image Eluate · Mar 16, 2015 at 08:07 PM 0
Share

Is that code inside of a co-routine? It should be.

avatar image D3tona · Mar 17, 2015 at 05:06 PM 0
Share
 IEnumerator checkLogin(string l, string s){
 
         WWWForm form = new WWWForm ();
         form.AddField ("func", "login");
         form.AddField ("username", l);
         form.AddField ("password", s);
 
         WWW webRequest = new WWW(URL_funcao,form);
         yield return webRequest;
 
         if (webRequest.error != null) {
             Debug.Log (webRequest.error);
 
         } else {
             Debug.Log (webRequest.text);}}

and then

 StartCoroutine (checkLogin (usr_name,usr_password));

same bug other pages: http://issuetracker.unity3d.com/issues/www-post-request-on-webplayer-built-by-unity-5-dot-0-0f2-creates-an-invalid-request

http://issuetracker.unity3d.com/issues/www-forms-do-not-work-properly-in-webplayer-unity-5

http://answers.unity3d.com/questions/917515/unity5-webplayer-wwwform-problem.html

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Multiple Cars not working 1 Answer

Help please guys thank you so much! 1 Answer

C# damage script help 1 Answer

Error with Hud C# script 1 Answer


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