Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
echo " --hyperlink--"; creates bad link
Old 08-07-2004, 01:52 AM echo " --hyperlink--"; creates bad link
jake5253's Avatar
Average Talker

Posts: 27
Location: Pennsylvania, USA
Trades: 0
Hi.

I'm making a small guestbook for my AIM SubProfile (I host all this myself so I'm not bothered by adverts and other crap. And plus it's just fun to play with the scripts!). When I use the echo " " command to print a hyperlink, the link isn't a valid link of AIM. I'm trying to get it to echo "aim:goIM?screenname=$list->name" the script, when the book is signed, saves it to a MySQL Database and retrieves it and prints upon the view page. I've tried numerous things to try to get it to be a link for my viewers to just click n type rather than copy/paste or whatever. I don't understand why it's giving me such a time.

The view.php script is as follows:

PHP Code:
<font color="yellow"><b> Welcome to the GuestBook!</b><br></font>
<br><font color="000000" face="Webdings" lang="143" size="2">3</font><font face="verdana" size="2" >
<a href="index" target="_self">Home</a>
<body bgcolor="green">
<?php
$dbhost 
"localhost";  
$databees "guest";  
$dbusername "root";
$dbpassword "mypass";
/* view the submitted entries */
mysql_connect($dbhost,$dbusername,$dbpassword);
@
mysql_select_db($databees) or die("Unable to select database");
$view "SELECT * FROM guestbook ORDER BY id DESC";

$query mysql_query($view);
$aantalrecords mysql_num_rows($query);
while (
$list mysql_fetch_object($query)) { 
echo 
"<p><table><tr><td><b>Name: </b></td><td>$list->naam</td></tr><br>";
echo 
"<tr><td><b>Screen Name: </b></td><td><a href=aim:goim?screenname=$list->email>$list->email</a></td></tr><br>";
echo 
"</a><tr><td><b>Comments: </b></td><td>$list->commentaar</td></tr><br></table></p>";
echo 
"<hr>";
}
Thanks in advance!
~Jake
jake5253 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-07-2004, 05:03 AM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
Maybe this will help;
first of all, enclose it in quotation marks, just make sure you escape them;

PHP Code:
<?php
echo "<a href=\"aim:........
secondly, collect your data as an array, and use it as such;

PHP Code:
<?php
$query 
mysql_query($view); 
$aantalrecords mysql_num_rows($query); 
while (
$list mysql_fetch_array($query)) { 
echo 
"<p><table><tr><td><b>Name: </b></td><td>".$list['naam']."</td></tr><br>"
echo 
"<tr><td><b>Screen Name: </b></td><td><a href=\"aim:goim?screenname=".$list['email']."\">".$list['email']."</a></td></tr><br>"
echo 
"</a><tr><td><b>Comments: </b></td><td>".$list['commentaar']."</td></tr><br></table></p>"
echo 
"<hr>"
}
__________________
Theres 10 types of people; those who understand binary, and those who don't.
webmaster and webdeveloper resources,
Please login or register to view this content. Registration is FREE

Last edited by webwoRRks; 08-07-2004 at 05:03 AM.. Reason: Missed second speach marks
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Reply     « Reply to echo " --hyperlink--"; creates bad link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10410 seconds with 12 queries