473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Array not recognized when form submitted

works fine in FF, not in IE

form
Expand|Select|Wrap|Line Numbers
  1. <form action = go.php method = get> <input type='checkbox' name='id[]' value='1'> <input type='checkbox' name='id[]' value='2'> <input type='checkbox' name='id[]' value='3'> <input type=submit value='Send'> </form>
go.php
Expand|Select|Wrap|Line Numbers
  1. if (is_array($_GET["siteid"]))
  2. echo "IS ARRAY";
  3. }
  4.  
any ideas why?

are there other ways in php to recognize the array?
Dec 3 '06 #1
4 1767
ronverdonk
4,258 Expert 4TB
works fine in FF, not in IE

form
Expand|Select|Wrap|Line Numbers
  1. <form action = go.php method = get> <input type='checkbox' name='id[]' value='1'> <input type='checkbox' name='id[]' value='2'> <input type='checkbox' name='id[]' value='3'> <input type=submit value='Send'> </form>
go.php
Expand|Select|Wrap|Line Numbers
  1. if (is_array($_GET["siteid"]))
  2. echo "IS ARRAY";
  3. }
  4.  
any ideas why?

are there other ways in php to recognize the array?
May because you use 'siteid' as the to be inspected array, while your select names are 'id[]'.

Ronald :cool:
Dec 3 '06 #2
whoops, i duplicated taht code freehand

they are both labeled siteid

May because you use 'siteid' as the to be inspected array, while your select names are 'id[]'.

Ronald :cool:
Dec 3 '06 #3
ronverdonk
4,258 Expert 4TB
Well, I tested it in IE 6 and it worked! Must be something else.

Ronald :cool:
Dec 3 '06 #4
it was something else

im an idiot haha

tahnks for the help

Well, I tested it in IE 6 and it worked! Must be something else.

Ronald :cool:
Dec 3 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: pablo | last post by:
Dear News Groupers, I'am trying to send a php array with a hidden input field from a form to another script. The array is NOT made directly by way of <input name="arrayname" />. The array is...
3
by: Nik Coughin | last post by:
I am having a problem with checkboxes... I have a number of blocks like this on my form: <input type="text" name="name" value="a name"> <input type="text" name="ddi" value="1234"> <input...
2
by: RC | last post by:
Order for PHP get the array from a HTML form checkbox or select tag. The HTML name MUST with . For example: <form methos=POST action="myfile.php"> <select name="pets" multiple> <option...
6
by: Douglas | last post by:
Hi, What is the need for the inaccessible pointer address beyond the end of an array? Eg. could for(ip = &array; ip < &array; ip++).... not be rewritten as
4
by: Paul Morrison | last post by:
Hi, I have a checkbox array containing the id of a record in a MySQL database. The checkboxes are created dynamically depending on what is stored in the database. I want to send the checkbox...
22
by: guitarromantic | last post by:
Hey everyone, I run a site with staff-submitted reviews, and most of them are written by one author. However, we also do "multiple" reviews. Up until now I just had a userid for a 'Multiple'...
2
by: AndyW2387 | last post by:
Hi I'm quite a newbie and have been struggling with sessions (!) What I'm trying to do is to add submitted values from a textfield (or ID number) to an array which is in a $_SESSION. ( It's for a...
6
by: =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post by:
Hey guys, I've searched high and low for a way to populate a vb array with data from a javascript array. I can find 50 ways to do it with ASP but not one for VB. I appreciate what help you can...
7
by: lawpoop | last post by:
Hello all - Is there a way to get a nested array in a $_POST variable? I have a form where there are several questions, each one corresponding to a database row. On submission of the form, I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.