Jump to content

AndrewM16921

New Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

AndrewM16921's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Actually, I guess I was doing it correctly afterall. Turns out you just can't hold objects in the session array I guess? I converted it to a string, then reconstructed it after, and it works fine. Weird.
  2. I'll look into this cookie jar then, thanks. Hopefully that will solve my problem. Also, I said front end is using ajax. I probably should have specified only ajax.
  3. That's actually the first thing that I tried. It didn't make any difference that I could tell, and didn't solve the problem. :/ I could have him change his requests around. But seeing as he used zero php, I was hoping to avoid having him change a large portion of his code (unless absolutely necessary). Isn't there a way to simply resume a session based on the session id, which could have been sent back and forth as I am doing?
  4. I have this project for school. There are three of us. I'm working on the "middle" (php/xml), while I have a partner working on the front end (ajax), and another partner on the back end (php/xml/mysql). I need to maintain a session for the front end accessing me, however it doesn't seem to work the same as when a user accesses the php file directly from the browser. Instead, he's doing something to make a request to my page with post variables, and I reply with xml. Similarly, I send a curl request to the back end and he replies in xml as well. So, I thought perhaps the browser somehow manages the session and sends a session id on every request. But since my page isn't accessed through a browser, but rather from the front end's page directly, perhaps this does not work. So, what I did was have him request a session id from me, and I'd start a session that way and reply with the id. Then, he'd send that sid for every request and I'd resume that specific session. Unfortunately, this does not seem to work. Here's the few lines of code that are relevant to this. ... //start session if sid provided if(isset($_POST['sid'])) { session_id($_POST['sid']); session_start(); } if(isset($_POST['r'])) { $req = $_POST['r']; if($req == 'session') { //destroy old session if set if(isset($_POST['sid'])) { session_destroy(); } //Starts a new session and replies with a session id session_start(); $_SESSION['schedule'] = new Schedule(); $reply = session_id(); } ...
  5. Ok, thanks for the info. I'll look into all that stuff.
  6. I've made a basic bulletin board already, I was thinking more of a real-time chat client. Perhaps ajax is what I need to use? I don't have a whole lot of web design experience, only random little things I do in my spare time. So essentially, more js than php? Or both?
  7. I could have sword I clicked on "coding help" ...please move this. Hi, I'm quite new to php so bear with me I was wondering if it was possible to create a server-like php file that would essentially interact with multiple users and allow them to communicate back and forth between users. Essentially, a client-server like thing. Not sure how to explain it better... I guess I need some sort of static memory that many sessions can access. The only thing I can think of now is make a session on one script, then the other scripts send a curl request or something with that session id to make certain requests. I'm sure there's a better way of doing this. Any help would be appreciated, thanks.
  8. I have URLs that look something like this: http://site.com/phpBB3/viewforum.php?f=15 http://site.com/phpBB3/viewtopic.php?f=15&t=128 In the forum's Overall_Header.html I have a portion of HTML that I want displayed in all sections except for one, which is f=15. So, what I wanted to do what something like this: if(f!=15) { ... } But, i don't know how to grab the value of f from the URL to use in a script. So.. How can I?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.