I'm pretty new to PHP, just followed a course and working on my final case to get a certificate. We're working on a webstore and I'm having trouble with updating my shopping cart. I know that this question has been asked before, but after reading through the answers, I can't fix my own code. I hope someone can help me with this.
If there's 1 item in the cart, it updates well, with more items, just one 1 item will be updated. Here's my shopping cart code (it's been EDITED since first post to be more complete):
<FORM method=get name=cart_quantity
action=winkelwagen.php>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD>
<TABLE class=productListing border=0 cellSpacing=0
cellPadding=2 width="100%">
<TBODY>
<TR>
<TD class=infoBoxHeading3 align=middle>Verwijder</TD>
<TD class=infoBoxHeading3>Artikel(en)</TD>
<TD class=infoBoxHeading3 align=middle>Aantal</TD>
<TD class=infoBoxHeading3
align=right>Totaal </TD></TR>
<?php
$sqlWinkelwagen = "SELECT * FROM tblorder
INNER JOIN tblorderregels
INNER JOIN tblartikelen
WHERE tblorder.Ordernummer = tblorderregels.Ordernummer AND SessieID = '" . session_id() . "' AND tblorderregels.Artikelnummer = tblartikelen.Artikelnummer";
$rsWinkelwagen = mysqli_query($db, $sqlWinkelwagen);
$WinkelwagenRegel = 0;
while ($rWinkelwagen = mysqli_fetch_array($rsWinkelwagen))
{
?>
<TR class=productListing-even>
<TD class=productListing-data vAlign=top
align=middle><br><br>
<img border="0" src="images/bin.png" width="30" height="30">
<input type=hidden name=Artikelnummer value=<?php echo($rWinkelwagen["Artikelnummer"]);?>>
<TD class=productListing-data><BR>
<TABLE border=0 cellSpacing=2 cellPadding=2>
<TBODY>
<TD class=productListing-data align=middle><A
href="http://www.mijnoscommerce.nl/demo/shop1/product_info.php?products_id=35{1}1"><IMG
title=" iPhone 3G - 8GB " border=0
alt="iPhone 3G - 8GB"
src="images/<?php echo($rWinkelwagen["Afbeelding"]);?>" width=100
height=80></A></TD>
<TD class=productListing-data vAlign=top><BR><A
href="http://www.mijnoscommerce.nl/demo/shop1/product_info.php?products_id=35{1}1"><B>
<?php echo($rWinkelwagen["Artikelnaam"]); ?>
</B></A> </TD></TR></TBODY></TABLE></TD>
<TD class=productListing-data vAlign=top
align=middle><BR><BR><INPUT
type="text" value=<?php echo($rWinkelwagen["Aantal"]); ?> size=4
name=AantalArtikel[<?php echo($rWinkelwagen["Artikelnummer"]);?>]
>
<input type=hidden
name=ArtikelID[<?php echo($rWinkelwagen["Artikelnummer"]);?>]
value=<?php echo($rWinkelwagen["Artikelnummer"]);?>
>
<input type=hidden name=action value=upd></TD>
<TD class=productListing-data vAlign=top
align=right><BR><BR><B>Ä
<?php
$TotaalArtikel = $rWinkelwagen["Aantal"] * $rWinkelwagen["Prijs"];
echo($TotaalArtikel);
$TotaalWinkelwagen = $TotaalWinkelwagen + $TotaalArtikel;
?>
</B> </TD>
<?php
} //einde while winkelwagen inhoud
mysqli_free_result($rsWinkelwagen);
?>
</TBODY></TABLE></TD></TR>
<TR>
<TD><IMG border=0 alt=""
src="winkelwagen_files/pixel_trans.gif" width="100%"
height=10></TD></TR>
<TR>
<TD class=main align=right><B>Subtotaal: Ä <?php echo($TotaalWinkelwagen); ?>
</B> </TD></TR>
<TR>
<TD class=stockWarning align=middle><BR>Artikelen met een: ***
Zijn momenteel niet besckikbaar in de door u gevraagde
hoeveelheid.<BR>U kan de geselecteerde hoeveelheid wel laten
staan en bij het afrekenen zal de beschikbare hoeveelheid
getoond worden.</TD></TR>
<TR>
<TD><IMG border=0 alt=""
src="winkelwagen_files/pixel_trans.gif" width="100%"
height=10></TD></TR>
<TR>
<TD>
<TABLE class=infoBox2 border=0 cellSpacing=1 cellPadding=2
width="100%">
<TBODY>
<TR class=infoBoxContents>
<TD>
<TABLE border=0 cellSpacing=0 cellPadding=2 width="100%">
<TBODY>
<TR>
<TD width=10><IMG border=0 alt=""
src="winkelwagen_files/pixel_trans.gif" width=10
height=1></TD>
<TD class=main><INPUT title=" Update Winkelwagen "
border=0 alt="Update Winkelwagen"
src="winkelwagen_files/button_update_cart.gif"
type=image
></TD>
<TD class=main><A
href="index.php"><IMG
title=" Verder winkelen " border=0
alt="Verder winkelen"
src="winkelwagen_files/button_continue_shopping.gif"
width=129 height=16></A></TD>
<TD class=main align=right><A
href="betalingswijze.php"><IMG
title=" Afrekenen " border=0 alt=Afrekenen
src="winkelwagen_files/button_checkout.gif"
width=86 height=16></A></TD>
<TD width=10><IMG border=0 alt=""
src="winkelwagen_files/pixel_trans.gif" width=10
height=1></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM>
After applying the form it returns to the same page, on top with this code:
<?php
require_once 'config.php';
$db = mysqli_connect($strDatabaseServer, $strUsername, $strPassword, $strDatabase);
if(!$db)
die('Fout bij verbinden met database: ' . mysqli_connect_error());
$sql = "SELECT * FROM tblorder where SessieId = '" . session_id() . "'";
if(!$rs = mysqli_query($db, $sql))
die('Fout in query: ' . mysqli_error());
if (mysqli_num_rows($rs) > 0)
{
$r = mysqli_fetch_array($rs);
$intOrdernummer = $r["Ordernummer"]; // bestaande ordernr
mysqli_free_result($rs);
}
//echo ($intOrdernummer);
if (isset($_GET["action"]))
{
switch ($_GET["action"])
{
case "del":
$strSQL = "delete from tblorderregels where Artikelnummer = '" . $_GET["Artikelnummer"] . "' AND Ordernummer = $intOrdernummer";
break;
case "upd":
foreach($_GET['ArtikelID'] as $key => $id){
$Artikelnummer = $id;
$aantal = $_GET['AantalArtikel'][$key];
//$sql2 = "update orders SET quantity = '$quantity' where item_id = '$item_id' ";
$strSQL = "update tblorderregels set Aantal = '" . $aantal . "' where Artikelnummer = '" . $Artikelnummer . "' AND Ordernummer = $intOrdernummer";
}
break;
}
$intGoed = mysqli_query($db, $strSQL);
if (!$intGoed)
die("Foutje in de SQL: " . $strSQL);
}
?>
I tried to make unique variables with GET, but somehow it isn't working
I hope some one can help with this, thanks in advance!
To confirm:
4th line of the html is a link that will give GET variables of $_GET['Artikelnummer'] = Artikelnummer and $_GET['action'] = del if you click the link
Final line of the html is a hidden input that will give a GET variable (since no method specified in the form element) of $_POST['action'] = upd, there is a hidden input for the Artikelnummer, and a text input for the number. You get this if you submit the form (there is no submit button in your current html)
Things that work:
If single/multiple item(s), clicking the delete link would just delete the one item you clicked for
If a single item, updating the name=AantalArtikel text input with the new number and submitting the form would update that item
Problems:
If multiple items, there is no way to tell which name=AantalArtikel text input refers to which Artikelnummer
Solution:
A separate form for each product that you want to update so multiple submit buttons
Or, each name=AantalArtikel text input must have a unique name e.g. name=AantalArtikel-Artikel1
Tip:
use print_r($_GET) to view what the form/link output is to see where you are going wrong
Additional Comments:
The rough format would be:
HTML
form
hidden input action="upd"
hidden input name="number_of_items" value="2"
product1 html
hidden input name="product1_name" value="red_car"
text input name="product1_number" value="1"
link ?product_name=NAME1&action=del
product2 html
hidden input name="product2_name" value="blue_car"
text input name="product2_number" value="1"
link ?product_name=NAME2&action=del
submit button
PHP
if GET action=del
-> sanitise input, delete product
if GET action=upd
-> for (i <= GET number_of_items)
-> sanitise input, get variables using $i in the name to loop through the numbers
I fixed the problem. The mysql query was not in my switch, so that's why the sql query was not being performed well.
Thanks for helping!
Related
i'm doing a little web application that works like a little booking.com.
I've written the code for searching the city and I can see the results in a table, how can I make linkable all the results (the name of the hotels for example) and have the redirection to the right hotel page for each result?
I've already tried with but I had some problem to redirecting to the right page and it gave me some code errors too
<?php
$con= new mysqli("localhost","root","","registration");
$name = $_POST['search'];
//$query = "SELECT * FROM hotels
// WHERE city LIKE '%{$name}%'";
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con, "SELECT * FROM hotels
WHERE city LIKE '%{$name}%'");
echo "
<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='532' height='23' id='AutoNumber1'>
<tr>
<td width='120' height='23' align='center'>Name</td>
<td width='179' height='23' align='center'>Address</td>
<td width='100' height='23' align='center'>Phone number</td>
<td width='150' height='23' align='center'>E-mail</td>
<td width='50' height='23' align='center'>Stars</td>
<td width='100' height='23' align='center'>Price single room</td>
<td width='100' height='23' align='center'>Price double room</td>
</tr>";
while ($row = mysqli_fetch_array($result))
{
echo "
<tr>
<td width='120' height='23'>$row[namehotel]</td>
<td width='179' height='23'>$row[address]</td>
<td width='100' height='23'>$row[phonenumber]</td>
<td width='150' height='23'>$row[email]</td>
<td width='50' height='23'>$row[stars]</td>
<td width='100' height='23'>$row[pricesingle]</td>
<td width='100' height='23'>$row[pricedouble]</td>
</tr>";
echo "<br>";
}
mysqli_close($con);
?>
In the meanwhile I couldn't create the link, if I have as result for example Hilton, the name should be clickable and it should redirect to the page of the Hilton hotel (created by me in html)
Thank you!
Im not sure if im understand right.. you need a html hyperlink?
echo '<tr>
<td width="120" height="23">
<a href="your/target/with'.$row[hotelID].'" >'.$row[namehotel].'</a>
</td>
<td width="179" height="23">'.$row[address].'</td>
<td width="100" height="23">'.$row[phonenumber].'</td>
...
...
</tr>';
ok i was able to create the hyperlink but is it possible to create a different link for every result?
I created the hyperlink with
when I create this page I cannot be able to bring the $_POST['namehotel'], I have Undefined error
I post the code:
<?php
session_start();
$con= mysqli_connect("localhost","root","","registration");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con, "SELECT * FROM hotels
WHERE namehotel LIKE '%{$_POST['namehotel']}%'");
mysqli_close($con);
?>
How can I have $_POST['namehotel'] from the previous search?
I am using the following code on a PHP page. When I load the page, the data shows up but the tag will not show anything other than a dot. If I add style="height:11px; width:16px", it shows a very very thin line (same goes if I just add height="11px" width="16px"
I can view the rendered html code and the img src is correct, it will display no problems. I can add, outside of my PHP script, an
as an example, and it displays just fine. So I am missing something within this snippet of code which is causing my grief?
I've looked in the Inspector tool in Chrome and I don't have any obvious errors other than a javascript error but I don't think that should be causing the issue.
The test page witho nly the two css. It works when I only have bootstrap.css but goes away when I add on the style.css
http://cronkflies.com/test5.php
<!-- Top Routes -->
<div class="col-lg-3" style="background:white;">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col" colspan="2"><span style="font-size:18px; font-weight:bold; text-transform:uppercase"><?php echo $lang_top_routes ?></span></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/includes/connections/mysqli.php";
require($path);
$sql = "SELECT vertrekluchthaven, lh.luchthavencode AS vertrek, lh.luchthavennaam AS vnaam, lh.countryflag AS vflag, aankomstluchthaven, lh2.luchthavennaam AS anaam, lh2.luchthavencode AS aankomst, lh2.countryflag AS aflag, COUNT(*) AS count
FROM tbl_vluchtgegevens vg
INNER JOIN tbl_luchthaven lh
ON vg.vertrekluchthaven = lh.luchthavenID
INNER JOIN tbl_luchthaven lh2
ON vg.aankomstluchthaven = lh2.luchthavenID
WHERE vg.vertrekdatum2 <=Now()
GROUP BY vertrekluchthaven, aankomstluchthaven
ORDER BY count DESC
LIMIT 10;";
$result = $result = $link->query($sql);
if ($result->num_rows > 0) {
echo" <table class='table'>";
echo " <tbody>";
while($row = $result->fetch_assoc()) {
$vflag = $row['vflag'];
$aflag = $row['aflag'];
echo " <tr>";
echo " <td align='center'><img src='http://cronkflies.com/img/flags/" . $vflag . "'></td>";
echo " <td ><div class='top10_luchthaven' data-tooltip=\"".htmlspecialchars($row['vnaam'])."\" >".$row['vertrek']."</div></td>";
echo " <td ><strong class='home_statistieks_label'> -</strong></td>";
echo " <td ><img src='http://cronkflies.com/img/flags/".$aflag."'></td>";
echo " <td ><div class='top10_luchthaven' data-tooltip=\"".htmlspecialchars($row['anaam'])."\" >".$row['aankomst']."</div></td>";
echo " <td ><strong class='home_statistieks_label'><div align='center'>".$row['count']."</div></strong></td>";
echo " </tr>";
}
echo " </tbody>";
echo "</table>";
}
$link->close();
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
It seems that you should have the same amount of columns in the header <th></th> as in the row <td></td>
I have this situation:
The table of my database is called reteconsolare and have these fields:
ID
Stato
Citta
Indirizzo
Telefono
Email
URL
Mappa
Descrizione (This is not really show. I use it only for showing the title of the images on Sito & Mappa links)
In this moment all works ok, just that When there are more "Citta" for "Stato" I wish that in the "Citta" colum would appear an input select with all the available name of the Citta for Stato ordering from A to Z and when changing the selection, should also show the correct Indirizzo, Telefono, Email, URL, Mappa.
Following is my actual code that repeat the values.
eg.:
Belgio | Bruxelles
Belgio | Charleroi
<?Php
mysqli_set_charset($connessione, 'utf-8');
$sql = "SELECT * FROM reteconsolare ORDER BY Stato, Citta";
$query = $connessione->query($sql) ;
while ($row = $query->fetch_assoc()) {
$stato=sprintf( $row["Stato"]);
$citta=sprintf( $row["Citta"]);
$indirizzo=sprintf( $row["Indirizzo"]);
$descrizione=sprintf( $row["Descrizione"]);
$email=sprintf( $row["Email"]);
$telefono=sprintf( $row["Telefono"]);
$mappa=sprintf( $row["Mappa"]);
$link=sprintf( $row["URL"]);
$id=sprintf( $row["ID"]);
?>
<tr>
<td width="20%"><ts><?Php echo($stato) ?></ts></td>
<td width="20%"><ts><?Php echo($citta) ?></ts></td>
<td width="30%"><ts><?Php echo($indirizzo) ?></ts></td>
<td width="10%"><ts><?Php echo($telefono) ?></ts></td>
<td width="10%"><ts><?Php echo emailize($email) ?></ts></td>
<td width="5%" align="center"><?Php echo(' <a target=_blank href='); echo($link); echo('>'); ?><img src="img/www.png" width="20" height="20" title="Link al sito del <?php echo ($descrizione);?>"></a></td>
<td width="5%" align="center"><?Php echo(' <a target=_blank href='); echo($mappa); echo('>'); ?><img src="img/Maps.png" width="20" height="20" title="Mappa del <?php echo ($descrizione);?>"></a></td>
</tr>
<?php } while ($row_news = $query->fetch_assoc());?>
<?php
function emailize($text)
{
$regex = '/(\S+#\S+\.\S+)/';
$replace = '$1';
return preg_replace($regex, $replace, $text);
}?>
I searched also an alternative way: not repeating the name of the Stato and Wrap every city with its data. I tried to play with mysql's group by... but without results. And anyway don't really like too much this solution. I think that i need to know maybe also Ajax to solve this problem, but at the moment i can't learn it...Thanks in advance.
You can do one thing: store "Stato" in array and check if the value already exist in array or not. For i.e. :
<?Php
mysqli_set_charset($connessione, 'utf-8');
$sql = "SELECT * FROM reteconsolare ORDER BY Stato, Citta";
$query = $connessione->query($sql) ;
$Stato = array() ;
while ($row = $query->fetch_assoc()) {
if(!in_array(sprintf($row["Stato"]),$Stato)){
$stato=sprintf( $row["Stato"]);
$Stato = sprintf( $row["Stato"]);
$citta=sprintf( $row["Citta"]);
$indirizzo=sprintf( $row["Indirizzo"]);
$descrizione=sprintf( $row["Descrizione"]);
$email=sprintf( $row["Email"]);
$telefono=sprintf( $row["Telefono"]);
$mappa=sprintf( $row["Mappa"]);
$link=sprintf( $row["URL"]);
$id=sprintf( $row["ID"]);
?>
<tr>
<td width="20%"><ts><?Php echo($stato) ?></ts></td>
<td width="20%"><ts><?Php echo($citta) ?></ts></td>
<td width="30%"><ts><?Php echo($indirizzo) ?></ts></td>
<td width="10%"><ts><?Php echo($telefono) ?></ts></td>
<td width="10%"><ts><?Php echo emailize($email) ?></ts></td>
<td width="5%" align="center"><?Php echo(' <a target=_blank href='); echo($link); echo('>'); ?><img src="img/www.png" width="20" height="20" title="Link al sito del <?php echo ($descrizione);?>"></a></td>
<td width="5%" align="center"><?Php echo(' <a target=_blank href='); echo($mappa); echo('>'); ?><img src="img/Maps.png" width="20" height="20" title="Mappa del <?php echo ($descrizione);?>"></a></td>
</tr>
<?php }} while ($row_news = $query->fetch_assoc());?>
<?php
function emailize($text)
{
$regex = '/(\S+#\S+\.\S+)/';
$replace = '$1';
return preg_replace($regex, $replace, $text);
}?>
Hope this will work for you.
Check syntax in while:
while ($row = $query->fetch_assoc()) {
...
} while ($row_news = $query->fetch_assoc());
Correct syntax:
while(condition) {
...
}
or
do {
...
} while(condition)
I am trying to print out on my sites home page a horizontal table which includes a picture of a car and then below the make, model & price of the car.
Here's roughly what I have done:
<?php
$List = "";
$sql = mysql_query("SELECT * FROM Car ORDER BY listed DESC LIMIT 5");
$Count = mysql_num_rows($sql);
if ($Count > 0) {
while($row = mysql_fetch_array($sql)){
$id = $row["id"];
$make = $row["make"];
$model = $row["model"];
$price = $row["price"];
$List .= '<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td width="20%" valign="top"><a href="/motors/cars.php?id=' . $id . '"><img style="border:#666 1px solid;"
src="/../../motors-' . $id . '.jpg" alt="' . $status . ' ' . $title . '" width="100" height="80" border="1" /></a></td>
</tr>
<tr>
<td width="80%" valign="top" align="left"><font face="Arial" color="#000080"><B>
' . $make . ' ' . $model . '</B></font><br />' . $price . '
view car details</align></td>
</tr>
</table>';
}
} else {
$List = "No cars at present";
}
mysql_close();
?>
Can anyone help me sort this code to print out horizontally? Many Thanks!
The src of the image is most likely wrong, /../../motors... is still /motors...
you can move the images into your webapps /motors/images folder and set src as /motors/images/motors...
The table you create must be nested in another table.
<table>
<tr>
<td>
<table of a car>
</td>
<td>
<table of a car>
</td>
<td>
<table of a car>
</td>
.... etc.
</tr>
</table>
It will make sense to emit a tr every few cars to wrap to a new line.
table of a car is the html you collect in $List.
I have a page that takes an SKU from a database and creates a page. Example URL: http://example.com/index.php?sku=1234567
When I load a URL like this, it shows nothing - not even the table which I output with echo. Below is my code:
$sku = $_GET['sku'];
$result = mysqli_query($conn, "SELECT productname, price, producturl, productimg, productdesc, sku FROM table WHERE sku=" . $sku);
while ($row = mysqli_fetch_array($result)) {
echo '<h3>test</h3>';
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><h4>'.$row["sku"].'</h4></td>
<td><h3>'.$row["productname"].'</h3></td>
<td rowspan="2"><img src="'.$row["productimg"].'" width="100%" alt="productimg"/></td>
</tr>
<tr>
<td colspan="2" rowspan="2"><p>'.$row["productdesc"].'</p></td>
</tr>
<tr>
<td><a class="button" href="'.$row["producturl"].'">View Product</a> <a class="alert button" href="">No Match</a> <a class="alert button" href="">Match</a></td>
</tr>
</table>';
}
I have connected to my database and have the <?php and ?> tags in there. I have noticed while playing around with it that if I remove this line:
while ($row = mysqli_fetch_array($result)) {
and also remove the closing }, it works but does not display any data - just the table. I am not sure what is going on here.
Simple. your mysqli_query call returns no records. Either no records are found, or there is an error. Make your code a little more robust.
$sku = $_GET['sku'];
if ($result = mysqli_query($conn, ...)) {
if (mysqli_num_rows($result) == 0) {
echo "no skus found";
} else {
while ($row = mysqli_fetch_array($result)) {
echo '<h3>test</h3>';
...
}
}
} else {
echo "something went wrong: ".mysqli_error();
}
(As a side note, please use parametrised queries, you are opening yourself up to SQL injection now. MySQLi is no magic bullet against this, you still have to validate / sanitize input.)
Display mysqli error on fault:
if (!mysqli_query($link, $sql)) {
printf("Errormessage: %s\n", mysqli_error($link));
}
Put $sku inside quotes.
<?php
$sku = $_GET['sku'];
$result = mysqli_query($conn, "SELECT productname, price, producturl, productimg, productdesc, sku FROM table WHERE sku = $sku");
while ($row = mysqli_fetch_array($result)) {
echo '<h3>test</h3>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><h4>'.$row["sku"].'</h4></td>
<td><h3>'.$row["productname"].'</h3></td>
<td rowspan="2"><img src="'.$row["productimg"].'" width="100%" alt="productimg"/></td>
</tr>
<tr>
<td colspan="2" rowspan="2"><p>'.$row["productdesc"].'</p></td>
</tr>
<tr>
<td><a class="button" href="'.$row["producturl"].'">View Product</a> <a class="alert button" href="">No Match</a> <a class="alert button" href="">Match</a></td>
</tr>
</table>';
}
?>
I have managed to solve the issues that i have been having i had to remove the i from mysqli, but i have used the same piece of code on another site so it may be something to do with the server or database maybe. here is the code though'
<?php
$sku = $_GET['sku'];
$objConnect = mysql_connect("host address","username","password") or die(mysql_error() . 'this is true death...');
$objDB = mysql_select_db("database");
$result = 'SELECT sku, productname, price, producturl, productimg, productdesc FROM table1 WHERE sku="' . $sku . '"';
$result = mysql_query($result);
while ($row = mysql_fetch_array($result)) {
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><h4>'.$row["sku"].'</h4></td>
<td><h3>'.$row["productname"].'</h3></td>
<td rowspan="2" width="30%"><img src="'.$row["productimg"].'" width="100%" alt="productimg"/></td>
</tr>
<tr>
<td colspan="2" rowspan="2"><p>'.$row["productdesc"].'</p></td>
</tr>
<tr>
<td><a class="button" href="'.$row["producturl"].'">View Product</a> <a class="alert button" href="">No Match</a> <a class="alert button" href="">Match</a></td>
</tr>
</table>';
}
?>