PDA

View Full Version : text linking from php when theres no link


mr_badger
06-30-2009, 03:11 PM
I have a little php code that I am requiring from a page but the problem is when I put text on the page it's linking to where the php code is linking.

How do I remove this, I'm doing something very simply wrong but can't see it.

here is the code.

<?php
require_once('Connections/products.php');

$query = "SELECT product_quantity, COUNT(product_quantity) FROM cart";
$result = mysql_query($query) or die(mysql_error());



while ($row = mysql_fetch_array($result)) {
echo 'You have <a href="cart.php"> '. $row['COUNT(product_quantity)']." ". "items in your cart";
}

?>



and this is the code from which I'm getting the strange link problem

<body>

<div id="itemtext">

<?php require ('itemcount.php'); ?>
</div>


<div id="hello">
Hello</div>



the word Hello is linking and I dont want it to. I know this is simple to fix.

domedia
06-30-2009, 03:13 PM
Are you closing the link anywhere?

mr_badger
06-30-2009, 03:51 PM
of course I wasn't, thankyou for pointing that out, feel very stupid right now.

domedia
06-30-2009, 05:26 PM
of course I wasn't, thankyou for pointing that out, feel very stupid right now. No probs, we've all been there ;)