Jump to content

Javascript \ Ajax Posting To Php \ Session


Horse
 Share

Recommended Posts

Hi all, I am quite new to all this so please go easy, and it is also my first post :) Ok, I've been learning 'AJAX' to make my shopping cart for my website. I have been using an open source example called 'Fly To Basket'So far so good, I'm just trying to put in session now. I have wrote a function in the javascript that basicly loops through the cart contents client side, I would like to post this string back to the php page server side without having to reload it if possible?Please help!Thanks

Link to comment
Share on other sites

You want to post a string to your server without refreshing the page. That means AJAX. You're learning AJAX. What part do you need help with? Try to be more specific. Or if your question is really about sessions, what part of sessions do you need help with?

Link to comment
Share on other sites

You want to post a string to your server without refreshing the page. That means AJAX. You're learning AJAX. What part do you need help with? Try to be more specific. Or if your question is really about sessions, what part of sessions do you need help with?
Sorry Dad, I am trying :) Not so much sessions, just getting a string back to my php page. Which will be put into a session.I am updating the page through javascript on the clients side, I am trying to get a string from the javascript file to the php file, so I can then update my session with the string from the javascript file.
Link to comment
Share on other sites

I understand you want to get a string from your client to your server. Do you just need to know everything about AJAX, or is there a specific part of the process that's got you confused?I don't know where to start helping. What have you done so far?

Link to comment
Share on other sites

I understand you want to get a string from your client to your server. Do you just need to know everything about AJAX, or is there a specific part of the process that's got you confused?I don't know where to start helping. What have you done so far?
I'm a newb, new to it all really. Learning as I go. What I have so far is:http://pick-a-mix.co.uk/test/When an item is clicked the string that goes into the text box is what I want to be the session, it's just getting it from javascript to php. I assume it will have to be posted or something
Link to comment
Share on other sites

You've linked your page to javascript for the Simple AJAX Code-Kit. This is third-party software. If you really want to use it, you should read the instructions that come with it.Before you do that, though, you should probably get a little more clear about the correct way to organize an HTML document.Maybe I'm wrong, but it looks like you're trying to learn a lot of different things all at once. Maybe you need to back up and work your way through some tutorials?

Link to comment
Share on other sites

You've linked your page to javascript for the Simple AJAX Code-Kit. This is third-party software. If you really want to use it, you should read the instructions that come with it.Before you do that, though, you should probably get a little more clear about the correct way to organize an HTML document.Maybe I'm wrong, but it looks like you're trying to learn a lot of different things all at once. Maybe you need to back up and work your way through some tutorials?
Not sure I just downloaded something called Fly To Basket and am using that there to learn. The HTML isn't organized as it is just for testing hence the /test/ folder its inside.I have read alot and learned alot from what I did know, this parts just bugging me so I thought I'd ask for a bit of help
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...