Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back a page or two to re-sync the thread and this will then show latest posts. Thanks, Mike.

Very Quick PHP/ MySql problem

  • 26-02-2009 1:27pm
    #1
    Registered Users, Registered Users 2 Posts: 3,875 ✭✭✭


    Hi I am having trouble placing links within if loops,

    this is what I am trying

    <?php $coursename =$row_chosencourse ; ?>


    <?php if ($coursename == "course1") {

    echo "You selected course";
    echo "<a href="venuetables.php">link</a>" ;

    }?>

    can you tell me where I am going wrong?

    and how can I add it to send a parameter eg venuetables.php?student=<?php echo $row_chosenstudent; ?>

    thanks for any help!


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Look at your quotes in the link echo. You are using the same quote types internally and externally.


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    aidan_wals is right.
    should be
    [php]
    echo "<a href=\"venuetables.php\">link</a>" ; //backslash the "

    //or

    echo "<a href='venuetables.php'>link</a>" ; //use single quote
    [/php]


Advertisement