Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.