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 there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Very Quick PHP/ MySql problem

  • 26-02-2009 12: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