Jeg skal kunne sende en stregn som f.eks "BNC Server 100" med methoden GET? Hvordan gør jeg det ?
PS. Det skal sorteres ned i array.
produkter.php Denne fil skal sende stegnen
<?php
session_start();
include("mysql.php");
?>
<html>
<head>
<title>
<?php
echo "XponBNC - Kvalitets BNC Hosting";
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="xpon_style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (xpon_800x600.psd) -->
<div align="center">
<!-- End ImageReady Slices -->
<table id="Table_01" width="530" height="559" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="6" class="site_r"><img src="images/xpon_800x600_01.gif" width="530" height="3" alt="Xpon"></td>
</tr>
<tr>
<td rowspan="5" valign="bottom" class="site_r"><img src="images/r_site_bund.gif" alt="Xpon" width="3" height="3" class="site_r"></td>
<td colspan="4" class="><img src="images/xpon_800x600_03.gif" width="524" height="31" alt="Xpon"><img src="images/xpon_800x600_03.gif" width="524" height="31" border="0" usemap="#Map"></td>
<td rowspan="5" valign="bottom" class="site_L"><img src="images/l_site_bund.gif" width="3" height="3"></td>
</tr>
<tr>
<td colspan="4"><img src="images/xpon_800x600_05.gif" width="524" height="134" alt="XponXpon"></td>
</tr>
<tr>
<td colspan="4"><img src="images/xpon_800x600_06.gif" alt="Xpon" width="524" height="32" border="0" usemap="#menu"></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF" class="main_tab">
<?php
$get_tekst = mysql_query("SELECT * FROM col_dktekst WHERE navn = 'produkter'");
$tekst = mysql_fetch_array($get_tekst);
$tekst2 = $tekst "tekst";
$tekst2 = str_replace(' headline', '<h2>', $tekst2);
$tekst2 = str_replace(' /headline', '</h2>', $tekst2);
$tekst2 = str_replace(' img', '<img src="', $tekst2);
$tekst2 = str_replace(' /img', '" alt="" border="0">', $tekst2);
$tekst2 = str_replace(' url', '<a href="', $tekst2);
$tekst2 = str_replace(' /url', '" target="_blank" class="normal_link">', $tekst2);
$tekst2 = str_replace(' link', '', $tekst2);
$tekst2 = str_replace(' /link', '</a>', $tekst2);
$tekst2 = str_replace(' bold', '<b>', $tekst2);
$tekst2 = str_replace(' /bold', '</b>', $tekst2);
$tekst2 = str_replace(' italic', '<i>', $tekst2);
$tekst2 = str_replace(' /italic', '</i>', $tekst2);
$tekst2 = str_replace(' underline', '<u>', $tekst2);
$tekst2 = str_replace(' /underline', '</u>', $tekst2);
$tekst2 = str_replace(' indryk', ' ', $tekst2);
$tekst2 = str_replace(' indryk1', ' ', $tekst2);
$tekst2 = str_replace(' indryk2', ' ', $tekst2);
$tekst2 = str_replace(' indryk3', ' ', $tekst2);
$tekst2 = str_replace(' seperate', '<img src=\\"images/hr.gif\\" width=\\"300\\" height=\\"1\\" alt=\\"\\">', $tekst2);
echo $tekst2;
?>
<br>
<br>
<br>
<br>
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0" class="produkter">
<?php
$get_produkter = mysql_query("SELECT * FROM col_produkter");
while($produkt = mysql_fetch_array($get_produkter)){
$navn = htmlentities($produkt "navn");
$pris = $produkt "pris";
echo '<tr>';
echo '<td width="70%"><u>'.$produkt "navn".'</u></td>';
echo '<td width="30%">'.$produkt "pris".'kr </td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2">'.$produkt "beskrivelse".'</td>';
echo '</tr>';
echo '<tr>';
echo '<td></td>';
echo "<td aliign=right><a href=".$_Server "php_self"."?action=Add&antal=1&pris=".$pris."&navn=".'$navn'."><strong>Køb</strong></a></td>";
echo '</tr>';
echo '<tr><td><br><td></tr>';
}
?>
</table>
<p align="center"> </p></td>
<td class="seperator"><img src="images/spacer.gif" width="2" height="355"></td>
<td colspan="2" valign="top" bgcolor="#FFFFFF" class="main_tab"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="kurv">
<tr>
<td colspan="2"> </td>
</tr>
<?php
include"kurv.php";
?>
<tr>
<td colspan="2" class="hr"> </td>
</tr>
<tr>
<td class="hr">Total:</td>
<td class="hr"><?php if(isset($total)){
echo $total."kr.";
} else {
echo "<p class=empty_basket>0 kr.</p>";}?> </td>
<tr>
<td>
<a href="bestil.php">Bestil</a></td>
<td>
<?php
echo "<a onclick=history.go(0) href=".$_Server "php_self"."?action=clear >Tøm kurv </a>";
?>
</td>
<tr>
<td> </td>
<td> </td>
</table>
</td>
</tr>
<tr>
<td colspan="3"><img src="images/xpon_800x600_10.gif" width="523" height="3" alt="Xpon"></td>
<td><img src="images/xpon_800x600_11.gif" width="1" height="3" alt="v"></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="3" height="1" alt="v"></td>
<td><img src="images/spacer.gif" width="371" height="1" alt="v"></td>
<td><img src="images/spacer.gif" width="2" height="1" alt="v"></td>
<td><img src="images/spacer.gif" width="150" height="1" alt="v"></td>
<td><img src="images/spacer.gif" width="1" height="1" alt="v"></td>
<td><img src="images/spacer.gif" width="3" height="1" alt="Xpon"></td>
</tr>
</table>
</div>
<map name="menu">
<area shape="rect" coords="-21,1,65,46" href="index.php">
<area shape="rect" coords="64,0,143,47" href="produkter.php">
<area shape="rect" coords="143,1,221,44" href="info.php">
<area shape="rect" coords="221,1,297,64" href="kontakt.php">
<area shape="rect" coords="296,1,371,49" href="status.php">
</map>
<map name="Map"><area shape="rect" coords="471,11,489,23" href="index.php" target="_self">
<area shape="rect" coords="497,10,516,24" href="indexeng.php" target="_self">
</map></body>
</html>
Her er den specifikke linje der gør det.
echo "<td aliign=right><a href=".$_Server "php_self"."?action=Add&antal=1&pris=".$pris."&navn=".'$navn'."><strong>Køb</strong></a></td>";
echo '</tr>';
håber i kan hjælpe
Hilsen Mads