Rena: PHP Link

Beitrag lesen

Hallo Leute!

Ich bin wirklich noch ein PHP Anfänger und brauche dringend eure Hilfe! Also, es ist eine Arbeit für die Uni. Wir mussten einen Online Shop in irgendeiner Sprache anfertigen. Ich habe mich für PHP und MySQL entschieden. Der Shop ist schon fertig aber ich habe ein kleines Problem. Wie in allen Online Shops, habe ich auch eine Suchfunktion einprogrammiert. Das einzige Problem ist, dass ich den Link zu den Produkten nicht einfügen kann.

Der Code ist:

---------------------------------------------------------------------
<html>
<head>
  <title>Renazon Search Results</title>
</head>
<body>
<h1>Renazon Search Results</h1>
<?
include ('product_sc_fns.php');
  trim($searchterm);
  if (!$searchtype || !$searchterm)
  {
     echo "You have not entered search details.  Please go back and try again.";
     exit;
  }

$searchtype = addslashes($searchtype);
  $searchterm = addslashes($searchterm);

$db_link = mysql_connect(localhost, root, "");

if (!$db_link)
  {
     echo "Error: Could not connect to database.  Please try again later.";
     exit;
  }

mysql_select_db("product_sc");
  $query = "select * from products where ".$searchtype." like '%".$searchterm."%'";
  $result = mysql_query($query);

$num_results = mysql_num_rows($result);

echo "<p>Number of products found: ".$num_results."</p>";

for ($i=0; $i <$num_results; $i++)
  {
     $row = mysql_fetch_array($result);
     echo "<p><strong>".($i+1).". Name: ";
     echo stripslashes($row["prname"]);
     echo "</strong><br>Author or Brand: ";
     echo stripslashes($row["authorORbrand"]);
     echo "<br>ASIN ";
     echo stripslashes($row["code"]);
     echo "<br>Price: ";
     echo stripslashes($row["price"]);
     echo "</p>";
}

display_button("index.php", "continue-shopping", "Continue Shopping");
do_html_footer();

?>

-----------------------------------------------------------

Ich will den Link hier haben:
echo "<p><strong>".($i+1).". Name: ";
echo stripslashes($row["prname"]);

Wie geht das? Ich habe schon einiges versucht, aber nichts hat geklappt :-(
Vielen dank schon mal für eure Hilfe :-)