Lau
04-17-2004, 11:32 PM
Hey everyone,
I'm having a bit of a head scrashing problem here.
I have a php file calling itself on submit:
This is only part of the file (I assume this is where the problem is, although not sure):
$url = "write_review.php?class=".$titleTable."&id=".$id;
echo "url is ".$url;
echo "<form action='".$url."' method='get'>";
// ============= display ===================
echo "<table width=60% border=0 cellpadding=5>";
echo "<tr height=20><td colspan=2 align=center><font size=+1>Ratings</font></td></tr>";
for ($i=0; $i<$j ;$i++) {
if ($hname[$i] != 'reviewer' && $hname[$i] != 'comment') {
echo "<tr><td align=right><i>" .$hdisplay[$i]. "</i></td>";
echo "<td align=left><input type='radio' name='".$hname[$i]."' value=1>1
<input type='radio' name='".$hname[$i]."' value=2>2
<input type='radio' name='".$hname[$i]."' value=3>3
<input type='radio' name='".$hname[$i]."' value=4>4
<input type='radio' name='".$hname[$i]."' value=5>5</td></tr>";
}
elseif ($hname[$i] == 'comment') {
echo "<tr height=20><td colspan=2 align=center><font size=+1>".$hdisplay[$i]."</font></td></tr>";
echo "<tr><td colspan=2 align=center>
<textarea name='".$hname[$i]."' rows=5 cols=70></textarea></td></tr>";
}// end elseif
} // end for
echo "<tr><td colspan=2 align=center><input type='submit' value='Submit'></td></tr>";
echo "</table></form>";
The echo "url is ".$url displays the right value, so it should go to that url. Instead, It goes to "write_review.php?comment="... Where does the comment come from????? :confused: :confused:
I really don't get where that comes from at all.
You can check it out at http://www1.coe.neu.edu/~lleccia/ISYG250/proj5/index.php try to write a review (id: user, pw: pass) and see when submitting
I'm having a bit of a head scrashing problem here.
I have a php file calling itself on submit:
This is only part of the file (I assume this is where the problem is, although not sure):
$url = "write_review.php?class=".$titleTable."&id=".$id;
echo "url is ".$url;
echo "<form action='".$url."' method='get'>";
// ============= display ===================
echo "<table width=60% border=0 cellpadding=5>";
echo "<tr height=20><td colspan=2 align=center><font size=+1>Ratings</font></td></tr>";
for ($i=0; $i<$j ;$i++) {
if ($hname[$i] != 'reviewer' && $hname[$i] != 'comment') {
echo "<tr><td align=right><i>" .$hdisplay[$i]. "</i></td>";
echo "<td align=left><input type='radio' name='".$hname[$i]."' value=1>1
<input type='radio' name='".$hname[$i]."' value=2>2
<input type='radio' name='".$hname[$i]."' value=3>3
<input type='radio' name='".$hname[$i]."' value=4>4
<input type='radio' name='".$hname[$i]."' value=5>5</td></tr>";
}
elseif ($hname[$i] == 'comment') {
echo "<tr height=20><td colspan=2 align=center><font size=+1>".$hdisplay[$i]."</font></td></tr>";
echo "<tr><td colspan=2 align=center>
<textarea name='".$hname[$i]."' rows=5 cols=70></textarea></td></tr>";
}// end elseif
} // end for
echo "<tr><td colspan=2 align=center><input type='submit' value='Submit'></td></tr>";
echo "</table></form>";
The echo "url is ".$url displays the right value, so it should go to that url. Instead, It goes to "write_review.php?comment="... Where does the comment come from????? :confused: :confused:
I really don't get where that comes from at all.
You can check it out at http://www1.coe.neu.edu/~lleccia/ISYG250/proj5/index.php try to write a review (id: user, pw: pass) and see when submitting