|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem passing the array values from test.php to test2.php
HI,
I'm having problems on web server1 and web server2 with pasing the array values from test.php to test2.php. when I print $count value return me 0, the array is empty! I already have this working on web server3. what could be my problem on the server1 and 2 [web server1] OS Debian 3.1 kernel 2.4-27 apache 1.3.33 php 4.3.10-2 [web server2] OS windows xp pro apache 2.0.52 php 4.3.10 [web server3] OS sentinix 0.70.5 kernel 2.4-22 apache 1.3.28 php 4.3.2 [test.php] <form name="form1" id=form1 method="post" action="test2.php"> <SELECT NAME="assigned_to[]" MULTIPLE SIZE="8"> <OPTION VALUE="100">None</OPTION> <OPTION VALUE="dtype">dtype</OPTION> <OPTION VALUE="tim_perdue">tim_perdue</OPTION> <OPTION VALUE="fusion94">fusion94</OPTION> <OPTION VALUE="precision">precision</OPTION> <OPTION VALUE="18">michael</OPTION> <OPTION VALUE="157">jbyers</OPTION> <OPTION VALUE="251">Lectric</OPTION> <OPTION VALUE="149">baddog</OPTION> <OPTION VALUE="105">mrzenn</OPTION> </SELECT> <input type="submit" name="submit" value="submit"/> </form> [test2.php] <?php $count= count($assigned_to); for ($i=0; $i<$count; $i++) { echo $assigned_to[$i]; } ?> |
|
#2
|
|||
|
|||
|
Do you have register_globals turned on on server 3?
|
|
#3
|
||||
|
||||
|
try this instead
[test2.php] PHP Code:
|
|
#4
|
|||
|
|||
|
register_globals on
Quote:
was off. now are on and working. thanks But what about Security issues about using it on? Do you know what changes I need to do to work with register_globals=off. Thnaks |
|
#5
|
||||
|
||||
|
Personally I think the code looks more structured with it turned off...
but feel free to read the register_globals documentation Quote:
I think you'd be better off leaving it off and updating your code to reflect that. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Problem passing the array values from test.php to test2.php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|