Jump to content

AJAX & Post Data


complex05

Recommended Posts

Two part question:

 

#1. I've built a little AJAX app, but the problem is anytime I do an update, I have to delete my temp files before I can see the update. Is there anyway around this?

 

#2. Is there a way to know all the variables submitted to a form without knowing what the variables are before hand? For example, I have a form, where there are checkboxes. Each checkbox's name is an ID value from the database. When I submit the form, I need to know all the rows that were checked...

 

Link to comment
https://forums.phpfreaks.com/topic/41452-ajax-post-data/
Share on other sites

Well since nobody helped me I managed to research it and find it myself... here are the answers..

 

no cache:

 

Header('Cache-Control: no-cache');

  Header('Pragma: no-cache');

 

then to get all the checkboxes to another page, name them as follows

 

<input type=checkbox name=checkbox[$id]>

 

then in the php page, treat $_POST['checkbox'] as an array.

 

Hope this helps someone in the future.

 

 

Link to comment
https://forums.phpfreaks.com/topic/41452-ajax-post-data/#findComment-200949
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.