Jump to content

Archived

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

CircularStopSign

echoing link code

Recommended Posts

echo '<a href="...">...</a>';

Share this post


Link to post
Share on other sites
Show me how you tried to do it and I'll tell you your problem...  To echo a link this is how you would do it...
[code]
<?php
echo '<a href="what">what what</a>';
?>
[/code]

if you have something different to do that -- id change it..

Share this post


Link to post
Share on other sites
ahh.. lemme do a test right quick... and i'll get back with you..

Share this post


Link to post
Share on other sites
Well since the syntax of the link itself is wrong -- it might work..  though if the syntax was right it wouldn't.. it would process the html.. see problem is gotta figure out how to make the html not process...

Share this post


Link to post
Share on other sites
[code]<?php echo htmlentities('<a href="http://www.example.com/">link</a>'); ?>[/code]

Share this post


Link to post
Share on other sites
ahh a new function.. havent seen this one before *heads to php.net for some reading*

Share this post


Link to post
Share on other sites
alright guys, this is finally what iput down and it works. thanks guys

[code]
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo htmlentities('<a href="http://www.hostmapics.com/"><img src="http://hostmapics.com/');
echo $target_path;
echo htmlentities('"></a>');
} else{
    echo "There was an error uploading the file, please try again!";
}[/code]

Share this post


Link to post
Share on other sites

×

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.