Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2011
    Posts
    141
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Link not echoing properly...php

    So basically the link text is echoing, but the its not clickable...

    PHP Code:
    <?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>
    Last edited by amcf1992; 09-20-2011 at 10:13 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Can we have a link to your page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,300
    Thanks
    4
    Thanked 203 Times in 200 Posts
    PHP Code:
    echo '<h4><a href="setaccount.php"> Select an account type </a></h4>'//this link is the one with the problem 
    Dave .... HostMonster for all of your hosting needs

  • #4
    Regular Coder
    Join Date
    Jul 2011
    Posts
    141
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I just tried the code you postsd, yet it still doesn't work

  • #5
    New Coder
    Join Date
    Aug 2011
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem maybe with your HTML your echoing
    PHP Code:
    echo "<h4><a href='setaccount.php'> Select an account type </a></h4>"//this link is the one with the problem 

    Try this

    PHP Code:

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

  • #6
    Regular Coder
    Join Date
    Jul 2011
    Posts
    141
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I just tried your code, and still not having luck.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •