/    Sign up×
Community /Pin to ProfileBookmark

echo user entered hyperlink!

Hey hey,

I have a form I am working on that allows all users to enter a website url in an input textbox and then submit it (being then posted on the subsequent page).

What would I need to do to have it echo the url itself that if clicked will take anyone to the website?

here is the code that tells it how to post the information:

[code]
<?php
// Let’s find out if we have taxonomy information to display
// Something to build our output in
$taxo_text = “”;

// Variables to store each of our possible taxonomy lists
// This one checks for a tool website
$website_list = get_the_term_list( $post->ID, ‘tool_website’, ‘<strong>Tool Website:</strong> ‘, ‘, ‘, ” );
if ( ” != $website_list ) {
$taxo_text .= “$website_list<br />n”;
}
// Output taxonomy information if there was any
// NOTE: We won’t even open a div if there’s nothing to put inside it.
if ( ” != $taxo_text ) {
?>
<div class=”entry-utility”>
<?php
echo $taxo_text;
?>
</div>
<?
[/code]

currently what this code does is make (essentially) a catagory listing. So the url will be posted, but when clicked it links to a page that shows all posts “catagorized” within that name. So if one entered “tools” as the url, it would have a clickable hyperlink that says “tools” and when clicked would redirect to a new page that has a list of all submissions listed with the string “tools”

if that makes sense.. I am sure it has to do with the $taxo_text variable.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @captainrad spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...