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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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