hey guys...do anyone know how to write a href function code where by the text msg is actually my $ command ?
here's some of the code
<?php
.
.
.
.
.
.
$user = $_COOKIE['ID_my_site'];
$result = @mysql_query("SELECT title FROM pix WHERE pid ='$user'");
if (!$result) {
exit('<p>Error retrieving patient list from database!<br />'.
'Error: ' . mysql_error() . '</p>');
}
while ($list = mysql_fetch_array($result))
{
<a href="newpage.php">"'.$list['title'].'"</a>; <<<<<<------ THIS PART !!
}
?>
i know the href code above is wrong...so how do i create a href code where the msg is my $command function..and by the way href function doesnt seem to work out inside <?php ?> area...
HELP ME!
Azhan
________________________
http://www.productcoverdesign.com- "Cheapest E-cover Design"
how to insert $ command in href fucntion to make it a link ?
Moderator: General Moderators
-
sureshmaharana
- Forum Commoner
- Posts: 30
- Joined: Thu Jul 03, 2008 4:20 am
- Contact:
Re: how to insert $ command in href fucntion to make it a link ?
Try this it works,
echo "<a href='newpage.php'>".$list['title']."</a>";
echo "<a href='newpage.php'>".$list['title']."</a>";
Re: how to insert $ command in href fucntion to make it a link ?
NICE!!!...it works!...thanks Suresh....but the link are totally too close with my previous echo
like this
Below are the title of the currently stored images, click on the name to viewzenith
where by "zenith" is the title that i call from database
how to i make it in the next line....not in the same line
thanks!
like this
Below are the title of the currently stored images, click on the name to viewzenith
where by "zenith" is the title that i call from database
how to i make it in the next line....not in the same line
thanks!
-
sureshmaharana
- Forum Commoner
- Posts: 30
- Joined: Thu Jul 03, 2008 4:20 am
- Contact:
Re: how to insert $ command in href fucntion to make it a link ?
Just use this one.
echo "<a href='newpage.php'>".$list['title']."</a><br>";
echo "<a href='newpage.php'>".$list['title']."</a><br>";