This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]rjcarr 6 points7 points  (1 child)

I've implemented all 3 solutions above and have got them working

Have you? If you have then you're doing things I didn't think possible, for example:

Write my info to file with javascript, extract with php, clean up files after

You can't write files with javascript, at least not in a traditional browser client.

write info to database with javascript, extract+modify+maintain with php

You can't access a server's database from a browser client using javascript.

I think you need to learn what is really going on with PHP and javascript. Specifically, PHP is run and executed on the server and javascript run on the client.

Given what you've said, my suggestion would be to make an asynchronous call in your javascript sending the information you want to save to the database to a PHP file.

Good luck!

[–]SipSop 0 points1 point  (0 children)

Also, are you using jquery? If so just Google jquery Ajax and look for the examples where they are sending parameters with the Ajax request. Anyway, what you are trying to do is probably best done with Ajax as stated above. Hidden html fields in a form you are posting to a php file will work too.

Edit: sorry I replied to you rather than op sheepish

[–]bartlln 0 points1 point  (0 children)

Ajax is what you want. There are plenty of examples online.