iphone app using session variables

Discussion in 'iOS Programming' started by spark3y, Apr 18, 2013.

  1. spark3y macrumors newbie

    Joined:
    Apr 18, 2013
    #1
    I am developing my first iphone application which now includes a login through a php script.

    Is it possible to use the $_SESSION variable which i creates on the php server side or how do i do this? When the user is logged in he will be able to read his messages and so on.
     
  2. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #2
    You asked the same question on iPhone Dev SDK, and your post there didn't make any more sense than it did here.

    Don't cross-post.

    And you're going to need to describe your problem in more detail. I gather you're creating a new server that will be running one or more PHP scripts. You want to offer user login? You want the user to be able to "read his messages and so on." What does that mean?

    Are you looking for some way to set up a session token so you can preserve an online session?
     
  3. spark3y thread starter macrumors newbie

    Joined:
    Apr 18, 2013
    #3
    Yes that is correct. I want to preserve a session in a secure manner so it wont be possible to spoof the userid for example.

    I was thinking about setting a unique token upon a successful login which i store in the mysql on server side and in app on client side. I then select the userid from the table where the unique token matches.
     
  4. bitslap47 macrumors 6502a

    bitslap47

    Joined:
    Jul 9, 2007
    #4
    I don't see any problem with cross-posting. They are two separate websites... he didn't post it in two forums on Macrumors.com.

    It makes perfect sense to me to ask multiple sources and compare suggestions picking the best one offered. In fact, its a good idea to research using multiple sources/resources.

    If the annoyance is that you see the same person asking the same question on two sites you are a member of... you'll need to get over that. Stuff gets re-posted everywhere all day long 365 days a year. You're going to see duplicate stuff on the web.
     
  5. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    I agree with Duncan.

    Don't cross-post.

    It is rude to expect other people to freely give their time to answer your question that might already be answered on another forum.

    Ask your question on one forum. Wait a suitable period of time for a reply, say 24 to 48 hrs. If you get no reply then it's fair to bump or post somewhere else.

    For me, I usually won't respond to posts that I notice are cross-posted. It makes me mad to see cross-posts.

    Don't be a help vampire.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    Mod Note: But please don't bump here at MacRumors, since it's against the Rules.
     
  7. truehybridx macrumors member

    Joined:
    Dec 6, 2010
    #7

Share This Page