SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: echo statements

  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    echo statements

    I am trying to get a hyperlink to have an id from the mysql db. (plantid)

    however Im missing a ; or ,

    according to the error returned
    Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in searchy.php on line 195

    where should I put it?


    Code:
    // Print out the contents of each row into a table
    	echo "<tr><td bgcolor= CCFF66><h2>"; 
    	echo $row['BotanicalName'];
    	echo "</td><td bgcolor= FFFFCC><h3>"; 
    	echo $row['CommonName'];
    	echo "</td><td bgcolor= CCFF66><h3>";
    	echo $row['CommonNameNotes'];
    	echo "</td><td bgcolor= FFFFCC><h3>";     
    	echo $row['Variety'];
    	echo "</td><td bgcolor= CCFF66><h3>";
    	echo "< a href='http://www.gardenaction.co.uk/plantreturn.php?="$row['plantid'];">tester</a>;
    	echo"</td><td bgcolor= FFFCC<h3>";
    }
    thanks in advance

  2. #2
    Dinah-Moe Humm mudshark's Avatar
    Join Date
    Dec 2003
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    echo "<a href='http://www.gardenaction.co.uk/plantreturn.php?=".$row['plantid']."'>tester</a>"

  3. #3
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that solved it, cheers


Bookmarks

Posting Permissions

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