Search found 7 matches
- Thu Aug 12, 2010 4:01 pm
- Forum: PHP - Code
- Topic: Updating Table
- Replies: 1
- Views: 119
Updating Table
Hello I am trying to update a table without having to update the whole page... This is the table... <div id="FriendsTable"> <table id="friendslist" width="730" border="0" background="XXXXXX"> <tr> <td width="75"><a href="#" onclic...
- Thu Aug 05, 2010 7:06 am
- Forum: PHP - Code
- Topic: Processing multiple arrays from HTML form
- Replies: 14
- Views: 774
Re: Processing multiple arrays from HTML form
Thank you all for your help, this script now does what I want.... But I do have one other question.... I currently use the image['name'] element to decide which image I am updating / uploading, which is fine, and it works, but two things happen... If the user uploads a different image in one of the ...
- Mon Aug 02, 2010 3:13 am
- Forum: PHP - Code
- Topic: Processing multiple arrays from HTML form
- Replies: 14
- Views: 774
Re: Processing multiple arrays from HTML form
This is my code, which now works, based on what has been suggested and based on my own reading... //SETUP FILE UPLOAD INDEX $index=0; //LOOP FOR ALL UPLOADED FILES foreach ($_FILES ['upload'] ['name'] as $loop) { //CLEARS SINGLE IMAGE ARRAY unset ($image); //IF NAME IS EMPTY SKIP ITERATION AND UPDAT...
- Sat Jul 31, 2010 5:13 pm
- Forum: PHP - Code
- Topic: Processing multiple arrays from HTML form
- Replies: 14
- Views: 774
Re: Processing multiple arrays from HTML form
Thanks for the help, I finally got this part working.. was much more complicated than I expected... I have to use the foreach ($_FILES ['upload'] ['name'] as $loop) as a counter for the number of files uploaded, and then use another loop foreach (array_keys ($_FILES ['upload']) as $key) to give me a...
- Sat Jul 31, 2010 6:31 am
- Forum: PHP - Code
- Topic: Processing multiple arrays from HTML form
- Replies: 14
- Views: 774
Re: Processing multiple arrays from HTML form
So, I now have my file count working correctly, and at the moment I am making sure I upload all files rather than leave elements in the array empty... Now I run a loop to go through the uploaded files like this: $fileloop = count ($_FILES ['upload']['name']); for ($arrayindex = 0; $arrayindex < $fil...
- Fri Jul 30, 2010 5:26 pm
- Forum: PHP - Code
- Topic: Processing multiple arrays from HTML form
- Replies: 14
- Views: 774
Re: Processing multiple arrays from HTML form
Thanks for that... That code returns this... Array ( [upload] => Array ( [name] => Array ( [0] => Image1.png [1] => Image2.png [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => ) [type] => Array ( [0] => image/x-png [1] => image/x-png [2] => [3] => [4] => [5] =>...
- Fri Jul 30, 2010 3:40 pm
- Forum: PHP - Code
- Topic: Processing multiple arrays from HTML form
- Replies: 14
- Views: 774
Processing multiple arrays from HTML form
Hello I am trying to post multiple files from a HTML form to a php page for processing but I always seem to end up with an array that is either 0, 5 or something else, but not the number of files I uploaded... This is the post form... <form method="post" action="process.php" enct...