Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Software & Web Development
Design
Very Quick PHP/ MySql problem
ShoulderChip
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!
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
aidan_walsh
Look at your quotes in the link echo. You are using the same quote types internally and externally.
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]