Link to home
Create AccountLog in
Avatar of dkim18
dkim18

asked on

Inserting php code inside of href tag

Hi Experts,

I am a php novice and I am trying to modify already written bulletin board php code.
If I do this:

<? echo $sitelink1 ?>

this generates something like this:
<a href="www.test.com">www.test.com</a>


but what I really want is:

<a href="www.test.com">Download</a>

what is the best approach in php? maybe parsing?

thanks,

Avatar of ddrudik
ddrudik
Flag of United States of America image

Determine where $sitelink1 is assigned in the PHP code.
Avatar of dkim18
dkim18

ASKER

It looks like here. User needs to enter video link and maybe href stuff is added when  a user submits. Can I make another variable to grab what user entered here?
+++++++++++++++++++++++++++++

<?=$hide_sitelink1_start?>
            <tr>
            <td align=center>&nbsp;&nbsp;Video Link</td>
            <td>
            <input style="width:95%" type=text name=sitelink1 value="<?=$sitelink1?>" <?=size(34)?> maxlength=255  style='border:1 solid #cccccc;' >
            </td>
            </tr>
            <?=$hide_sitelink1_end?>      
            
            
            
            
            
   <?=$hide_sitelink2_start?>
ASKER CERTIFIED SOLUTION
Avatar of ddrudik
ddrudik
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks for the question and the points.