Jump to content

[SOLVED] Create Link


refiking

Recommended Posts

How can I make the borrower's name a link?  The section that is the borrower's name is this:

<tr><td>{$row[bln]}, {$row[bfn]}</a></td>

 

Here is the code:

 

echo "<a href="$loan_id.".php""<tr><td>{$row[bln]}, {$row[bfn]}</a></td><td>{$row[cln]}, {$row[cfn]}</td><td>{$row[loan_id]}</td><td>{$row[status]}</td></tr>";

 

Here is what is returned when I run the script:

 

Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in /home/public_html/test/test.php on line 10

Link to comment
https://forums.phpfreaks.com/topic/84374-solved-create-link/
Share on other sites

papface does the code look correct to u have a look at the arrays there self

 

 

$row['what_ever']

Not sure what you mean to be honest??

Short tags will bite you sooner or later.

Yeah don't usually use them in my coding.

This is what I usually do because I find it easier to see the PHP parts and HTML parts this way.

I have edited the code:

?>
<a href="<?php echo $loan_id;?>.php"><tr><td><?php echo $row['bln'];?>,<?php echo $row['bfn']; ?></a></td><td><?php echo $row['cln'];?>, <?php echo $row['cfn']; ?></td><td><?php echo $row['loan_id']; ?></td><td><?php echo $row['status']; ?></td></tr>
<?php

Link to comment
https://forums.phpfreaks.com/topic/84374-solved-create-link/#findComment-429789
Share on other sites

OK, so here is the current code as it is.

 

echo "<tr><td><a href='borrower.php?loan_id=$loan_id'>{$row[bln]}, {$row[bfn]}</a></td><td>{$row[cln]}, {$row[cfn]}</td><td>{$row[loan_id]}</td><td>{$row[status]}</td></tr>";

 

The links show up on each one, but it doesn't show the $loan_id in the address.  For example, when I click on the first link, here is where it tries to take me to:

 

www.mydomain.com/test/borrower.php?loan_id=

 

How can I get it to actually insert that loan_id for that entry?

Link to comment
https://forums.phpfreaks.com/topic/84374-solved-create-link/#findComment-429874
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.