TIA for your help!
I have a page (code snip below) named "browse" which has a table in it with
rows like this:
2003 1500 Silverado pickup red 51,024 $19,995 Details
---------
each row of the table has a hidden id number which is to be passed on to the
next page when the user clicks on "Details" or any other item in the row.
In the code snip below is the javascript that processes the submit when
"Details" is clicked as well as the relevant table code.
When the subsequent page, "details.ph p" is loaded the following two lines
are executed:
$id = $_REQUEST['d'];
$ids = $_REQUEST['ids'];
In php.ini "register_globa ls" is off.
The problem is: Both ['d'] and ['ids] appear to be recognized but, $id
returns the correct value of "8", while $ids is "" instead of "'2615631'"
What I don't understand is why one works and the other doesn't.
Could someone explain the difference? I've tried some of the tips given for
using extract without any success.
Thanks
Marty
<html>
<head>
<link href="general.c ss" rel="stylesheet " type="text/css">
<script language="Javas cript">
var marked_row = new Array;
function getDetails(obj)
{ theIDField = eval('document. browse.id'+obj) ;
theIDField.chec ked = "true";
document.browse .submit();
return true;
}
</script>
--snipped other code not relevant(I think)
<form method=post name=browse action=details. php><input type=hidden name=d
value="8">
<tr>
<td colspan=9><font color=black>Cli ck Column Headings To
Sort.</font></td>
</tr>
<tr bgcolor=#D93540 >
<td colspan=9><p class=bigheadin g><font
color=#FFFFFF>C hevrolet</font></p></td>
</tr>
<tr>
<td colspan=9><br></td>
</tr>
<tr bgcolor=#eeeeee id=0 onmouseover="hi ghlight(this);"
onmouseout="unh ighlight(this); ">
<td valign=top><fon t color=black><in put type=checkbox id=id2615631
name=ids[] value="2615631" ></font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>200 3</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>150 0 SILVERADO</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>PIC KUP</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>RED </font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>51, 024</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>$19 ,995</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black></font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>
<a href=# onClick="getDet ails('2615631') ; return
true;">Details</a></font></td>
</tr>
<tr bgcolor=#ffffff id=1 onmouseover="hi ghlight(this);"
onmouseout="unh ighlight(this); ">
<td valign=top><fon t color=black><in put type=checkbox id=id2615581
name=ids[] value="2615581" ></font></td>
<td valign=top onClick="getDet ails('2615581') ; return true;"><font
color=black>200 3</font></td><td valign=top
--snipped-repeat entries for multiple lines in table
I have a page (code snip below) named "browse" which has a table in it with
rows like this:
2003 1500 Silverado pickup red 51,024 $19,995 Details
---------
each row of the table has a hidden id number which is to be passed on to the
next page when the user clicks on "Details" or any other item in the row.
In the code snip below is the javascript that processes the submit when
"Details" is clicked as well as the relevant table code.
When the subsequent page, "details.ph p" is loaded the following two lines
are executed:
$id = $_REQUEST['d'];
$ids = $_REQUEST['ids'];
In php.ini "register_globa ls" is off.
The problem is: Both ['d'] and ['ids] appear to be recognized but, $id
returns the correct value of "8", while $ids is "" instead of "'2615631'"
What I don't understand is why one works and the other doesn't.
Could someone explain the difference? I've tried some of the tips given for
using extract without any success.
Thanks
Marty
<html>
<head>
<link href="general.c ss" rel="stylesheet " type="text/css">
<script language="Javas cript">
var marked_row = new Array;
function getDetails(obj)
{ theIDField = eval('document. browse.id'+obj) ;
theIDField.chec ked = "true";
document.browse .submit();
return true;
}
</script>
--snipped other code not relevant(I think)
<form method=post name=browse action=details. php><input type=hidden name=d
value="8">
<tr>
<td colspan=9><font color=black>Cli ck Column Headings To
Sort.</font></td>
</tr>
<tr bgcolor=#D93540 >
<td colspan=9><p class=bigheadin g><font
color=#FFFFFF>C hevrolet</font></p></td>
</tr>
<tr>
<td colspan=9><br></td>
</tr>
<tr bgcolor=#eeeeee id=0 onmouseover="hi ghlight(this);"
onmouseout="unh ighlight(this); ">
<td valign=top><fon t color=black><in put type=checkbox id=id2615631
name=ids[] value="2615631" ></font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>200 3</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>150 0 SILVERADO</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>PIC KUP</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>RED </font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>51, 024</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>$19 ,995</font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black></font></td>
<td valign=top onClick="getDet ails('2615631') ; return true;"><font
color=black>
<a href=# onClick="getDet ails('2615631') ; return
true;">Details</a></font></td>
</tr>
<tr bgcolor=#ffffff id=1 onmouseover="hi ghlight(this);"
onmouseout="unh ighlight(this); ">
<td valign=top><fon t color=black><in put type=checkbox id=id2615581
name=ids[] value="2615581" ></font></td>
<td valign=top onClick="getDet ails('2615581') ; return true;"><font
color=black>200 3</font></td><td valign=top
--snipped-repeat entries for multiple lines in table
Comment