Thanks!

That helped me get pass that error. However, maybe my logic is wrong, when I
clicked the "Submit" button, it took me to the detail page of the last search
result. I figured I'd need to move that input tag for the hidden value
somewhere instead. Tried a few places but still didn't work.

any comments?

thanks!

Jordan


Patrick Shoaf wrote:

> I am not very familiar with php, but why are you using an echo within an
> echo statement?
>
> 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>";
>
> why not try this....
>
> echo "<td width=200>$fname&nbsp;$lname</td>";
> echo "<td width=200>$title</td>";
> echo "<td><input type=\"hidden\" name=\"fid\" value=\"$fid\">";
> echo "<input type=\"submit\" name=\"submit\" value=\"Choose this
> faculty\"></td>";
>
> Also, most languages require you to escape " when used within quotes.
>
> At 01:32 PM 10/17/2003, Jordan Morgan wrote:
> >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]
>
> Patrick J. Shoaf, Systems Engineer
> <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>
> Midmon Internet Services, LLC
> 100 Third Street
> Charleroi, PA 15022
> http://www.midmon.com
> Phone: 724-483-2400 ext. 105
>   or    888-638-6963
> Fax:   724-489-4386
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




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

Reply via email to