Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question WWWForm not posting my varieble

Discussion in 'Scripting' started by BlackyCaro, Jul 7, 2020.

  1. BlackyCaro

    BlackyCaro

    Joined:
    Jun 29, 2020
    Posts:
    2
    Hi guys,
    I try to post a value via WWWForm but its not posting.

    Debug.Log(UserInfo.userID) shows right id(right value). There is no problem here but when I try to post it with www

    form.AddField("id", UserInfo.userID); posting nothing. I check in my php file and recevied nothing.

    There is no problem with php file because when I try like this form.AddField("id", 15); it passes with id 15 and i see in mysql.

    Any idea why form.AddField("id", UserInfo.userID); post empty id. By the way other form.AddFields in same wwwForm work perfectly fine and post value right.
     
  2. BlackyCaro

    BlackyCaro

    Joined:
    Jun 29, 2020
    Posts:
    2
    SOLVED

    The problem is that my UserInfo.userID was a string. And i convert into int. So that now it works.