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 /
This question was closed Jun 15, 2013 at 08:28 PM by Graham-Dunnett for the following reason:

Duplicate Question

avatar image
-1
Question by tekkers0751 · Jun 15, 2013 at 07:55 PM · wwwloginphpwwwform

Necessary Data Rewind Wasn't Possible WWWForm Error

I am trying to create a login script, and when I run the code I get this error: Necessary Data Rewind Wasn't Possible. Why is this? Any help would be much appreciated.

 #pragma strict
 var formUser = ""; 
 var formPass = "";
 var formText = "";
 
 var formURL  = "http://localhost/unity/checkuser.php";
 var hash = "45gfv";
 
 function OnGUI () {
     GUILayout.BeginArea ( new Rect(Screen.width / 2 - 100, Screen.height / 2 - 50, 300, 500) );
     
     formUser = GUI.TextField (Rect (0, 0, 300, 50), formUser);
     formPass = GUI.TextField (Rect (0, 55, 300, 50), formPass);
 
     if(GUI.Button(Rect(0,110,148,50),"Login"))
     {
         Login();
     }
     if(GUI.Button(Rect(152,110,148,50),"Register"))
     {
           //register form
     }
     
     GUI.Label (Rect (0, 165, 300, 50), formText.ToString());
     
     GUILayout.EndArea();
 }
 
 
 function Login()
 {
     var form = new WWWForm();
     form.AddField("login_hash", hash);
     form.AddField("login_user", formUser);
     form.AddField("login_pass", formPass);
     
     var w = WWW(formURL, form);
     yield w;
     if(w.error != null) {
         print(w.error);
         formText = "Unexpected Error, Please Try Again.";
     }
     else {
         print("Form Ok");
         formText = w.data;
         w.Dispose();
     }
     formUser = "";
     formPass = "";
 }
Comment
Comments Locked · Show 1
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 Graham-Dunnett ♦♦ · Jun 15, 2013 at 08:27 PM -1
Share

Google not working for you?

http://forum.unity3d.com/threads/64152-Issues-with-WWWForm-necessary-data-rewind-wasn-t-possible

http://answers.unity3d.com/questions/159834/post-request-using-www-class-error-necessary-data.html

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

15 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

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

Why do I get a newline (\n br) while sending a simple string from php to Unity c# 1 Answer

Would a WWW to a PHP file return the computers Info? 0 Answers

Problem using WWW with PHP and MYSQL 3 Answers

seperate binary retrieved from sql server 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