Hi this might sound like a simple question to most but it is something that i have been trying for quiet a while. I have a table in mysql, which contains a name of a football match, date, time , and one of the variables is a link address to another page which contains photos. i would like to know who to write the code in php, so that when the list of matches comes up, one can choose the line he/she would like to see see, by clicking on the desired hyperlink.

to understand better what i am trying to say please visit this link http://www.dragon64.net/schedule1.php.

I would like that the photos variable would be clickable taking the user to the desired page

patrick

Hi Patrick,

If you put an <a> tag around your link string you'll achive the desired affect.

hi Xavier2k

This is the string i had , where do i have to put the <a>

<td> <a href="$row_schedule" </a> <?php echo $row_schedule ; ?></td>

thank you in anticipation

Assuming your PHP code is correct the following should work:

<td><a href="$row_schedule['photos']"><?php echo $row_schedule ['photos']; ?> </a></td>

Assuming your PHP code is correct the following should work:

<td><a href="$row_schedule['photos']"><?php echo $row_schedule ['photos']; ?> </a></td>

hi

i uploaded the script you suggested but still i have the same error, when i click on the result that comes from the database, the system does not link to the proper link.

you can have a look at the page in question http://www.dragon64.net/schedule1.php and see what happens.

thank you in anticipation for your assistance

Member Avatar

fatihpiristine

try this.
<td><a href=<?php print "$row_schedule; ?>"><?php print $row_schedule ; ?> </a></td>

Try fatihpiristine's post, or this:

<td><a href="<?=$row_schedule?>"><?=$row_schedule?> </a></td>


ch.-

try this.
<td><a href=<?php print "$row_schedule; ?>"><?php print $row_schedule ; ?> </a></td>

This is what i got when i tried the above
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/d/r/a/dragonaquarius/html/schedule1.php on line 149

Try fatihpiristine's post, or this:

<td><a href="<?=$row_schedule?>"><?=$row_schedule?> </a></td>


ch.-

it worked beutifully.

Member Avatar

fatihpiristine

This is what i got when i tried the above
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/d/r/a/dragonaquarius/html/schedule1.php on line 149

didnt work coz you didnt drop the space there after row_schedule..

not my problem.