iphone app using session variables

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

  1. spark3y macrumors newbie

    Apr 18, 2013
    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

    Jan 21, 2008
    Northern Virginia
    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

    Apr 18, 2013
    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


    Jul 9, 2007
    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 68040


    Sep 2, 2008
    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


    Staff Member

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

    Dec 6, 2010

Share This Page