...

View Full Version : Link not echoing properly...php



amcf1992
09-20-2011, 10:10 PM
So basically the link text is echoing, but the its not clickable...


<?php session_start(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="includes/css/style.css" rel="stylesheet" type="text/css">
<title>Account Dashboard</title>
</head>
<body>
<div id="header">
DIGICENT
</div>
<?php
include('dbsettings.php');

$con = mysql_connect("$host","$user","$password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("$db_name", $con);
$username= $_SESSION['username']; // Editted

$sql="SELECT * FROM `user` WHERE `username`='{$username}'";

$result = mysql_query("$sql");
?>
<div class= "accountsummary">
<?
while($row = mysql_fetch_array($result))
{
echo "<i>Dashbord</i>";
echo "<BR />";
//echo $row['firstname'] . " " . $row['lastname'];
echo "<BR />";
echo "<h5>Account Type:</h5> ";
if($row['account']=='')
echo "<h4><a href='setaccount.php'> Select an account type </a></h4>"; //this link is the one with the problem
else {

echo $row['account'];
}
echo "<BR />";
echo "<h5>Billing Address: </h5>";
echo $row['address'];


}
?>
</div>
<p class="logout">
<a href=logout.php>Logout</a>
</p>
<?php

mysql_close($con);
?>

</body>
</html>

abduraooft
09-21-2011, 08:01 AM
Can we have a link to your page?

djm0219
09-21-2011, 08:55 AM
echo '<h4><a href="setaccount.php"> Select an account type </a></h4>'; //this link is the one with the problem

amcf1992
09-21-2011, 04:25 PM
I just tried the code you postsd, yet it still doesn't work

Atrhick
09-21-2011, 04:38 PM
The problem maybe with your HTML your echoing

echo "<h4><a href='setaccount.php'> Select an account type </a></h4>"; //this link is the one with the problem


Try this




echo "<h4><a href=\"setaccount.php\"> Select an account type </a></h4>";

amcf1992
09-21-2011, 04:44 PM
I just tried your code, and still not having luck.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum