Daniel,
$myrow["artist"] and $myrow["title"]
might be a good place to start. It looks like all your ; are in place.
I don't think you can place " inside [] like that:
echo "<tr><td>".$myrow["artist"]."<td>".$myrow["title"];
> I have been struggling with this code: I was wondering if someone could
> lend me a hand.
> Line 12 happens to be the WHILE statement. I am not sure if it is the
> while statement or the results its looking for.
>
> TIA So far, i havent been able to sleep atleast until I get this.
>
> <html>
> <?
> if (isset($searchstring))
> {
>
> $db = mysql_connect("localhost","webuser","");
> mysql_select_db("cd_collection",$db);
> $sql= "SELECT * FROM cd_list WHERE $searchstring LIKE '%searchstring%'
> ORDER BY artist ASC";
> $result = mysql_query($sql,$db);
> echo "<TABLE BORDER=2>";
> echo "<tr><td><b>Artist</b><td><b>Title</b><td><b>Options</b></tr>";
> while ($myrow = mysql_fetch_array($result))
> {
> echo "<tr><td>".$myrow["artist"]."<td>".$myrow["title"];
> echo "<td><a href=\"edit.php?id=".$myrow["cd_id"]."
> \">View</a>";
> }
> echo "</TABLE>";
> }
> else
> {
> ?>
> <form method="POST" action="<? $PHP_SELF ?>">
> <table border="2" cellspacing="2">
> <tr><td>Insert Your Search String Here.</td>
> <td>Search Type</td></tr>
> <tr>
> <td><input type="text" name="searchstring" size="28"></td>
> <td><select size="1" name="searchtype">
> <option selected value="artist">Artist</option>
> <option value="title">Title</option>
> <option value="category">Category</option>
> </select></td>
> </tr>
> </table>
> <p><input type = "submit" value="Submit" name="B1">
> <input type="reset" value="Reset"></p>
> </form>
> <?
> }
> ?>
>
> </html>
>
> **DAN**
--
John Taylor-Johnston
-----------------------------------------------------------------------------
' ' ' Coll�ge de Sherbrooke:
��� http://www.collegesherbrooke.qc.ca/languesmodernes/
- Universit� de Sherbrooke:
http://compcanlit.ca/
819-569-2064
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php