PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi people...
someone please help me out here.
i have a form wid a textbox..when i enter a url into it during run time i want it to appear as a link..as in i shud be able to click on it and visit the url.
i also have a sql database where this url will be stored..everything is working fine except i dont know how to display a link using a form display.
thanks in advance
Last edited by lostinphp on Wed Aug 24, 2005 7:31 am, edited 1 time in total.
i have a submit.php where i have the form where i can enter the url
and a view.php to execute the display.so at which point shud i do function addlink so dat the text entered in the text box is clickable when it is displayed using view.php
i hope im makin myself clear.
thank u.
$query = "SELECT links FROM homepage WHERE text='$text'";
$result = mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result) == 0) {
echo "There are no links in the database.";
} else {
while ($links = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<a href="'.$links['links'].'" target="_blank">'.$links['links'].'</a><br />';