Hi!
I'm learning at a starting stage. Have problem with getting sql results into table. Can anyone please point me into the right direction? (code below)
Also, what is the best way to study PHP. I got some books, but to me they are'nt helpful. There's some theory explained, thats fine, but real coding isn't there or it is given with no explanation.
Thank you in advance!
<BODY>
<?php
if(!$co)
{
php?>
<FORM METHOD="POST">
<INPUT TYPE="text" NAME="co">
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SUBMIT">
</FORM>
echo "Write here what you are looking for";
<?php
exit;
$db ="picture_source";
$table = "binary_data";
$connect = mysql($db, "select * from $table where description like '%$co%'");
$num = mysql_numrows($connect);
echo "There is $num records in this table for $co";
echo "<p>";
<table border="1" frame="border" rules="all">
<TR>
<TH> Your Results:
$i=0;
while ($i < $num)
{
$username = mysql_result($connect,$i,description);
$pic = mysql_result($connect,$i,bin_data);
$i++;
<TR>
<TD allign center> echo $pic
</table>
//echo $username;
echo "<p>";
//echo $pic;
//echo "<p>";
}
exit;
php?>