Hi,

I'm still learning on this. Pls. excuse me if I simply overlooked
something.

Originally I had this:

<?
// list matches

while (list($fid, $title, $lname, $fname) = mysql_fetch_row($result))
 {
 echo "<table border=2 width=400 cellpadding=2 cellspacing=2><tr>";
 echo "<td width=200><a
href=FacDetails.php?fid=$fid>$fname&nbsp;$lname</a></td><td
width=200>$title</td>";
 echo "</tr></table>";
 }
?>

to list the search results and display them as a link which will take
the user to a detailed page. However, the fid has to show up as part of
the URL. I want to hide the fid as I don't want people to view the other
detailed records just by randomly entering the number for the fid. So I
tried to modify it and came up with the following:

<form action="FacDetails.php4" method="post">

<?
// list matches

while (list($fid, $title, $lname, $fname) = mysql_fetch_row($result))
 {
 echo "<table border=2 width=400 cellpadding=2 cellspacing=2><tr>";
 echo "<td width=200>$fname&nbsp;$lname</td><td
width=200>$title</td><td><input type="hidden" name="fid" value="<? echo
$fid; ?>"><input type="submit" name="submit" value="Choose this
faculty"></td>";
 echo "</tr></table>";
 }
?>
</form>

Basically I was trying to see if I can simply add a submit button to
every row so that fid will be invisible to the users. But it didn't
work. It kept telling me: "Parse error: parse error, unexpected
T_STRING, expecting ',' or ';' in
/home/virtual/site482/fst/var/www/html/PHP/latest/SearchFaculty_Rslt.php4
on line 145" where line 145 is the line where the 2nd echo statement is
located as above.

I tried to move the <input type="hidden"..<?echo $fid;?>"> section up,
just below the <form> tag. Still same error for the same line 145.

My questions are:

1) What's wrong with my script? How can I fix that?
or
2) Is there another way to achieve my goal without using the Submit
button at all?

Thanks for reading this and all your help.

Jordan




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to