PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 1st, 2012, 08:14 AM
wayne12690 wayne12690 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 26 wayne12690 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 29 m 41 sec
Reputation Power: 0
PHP-General - PHP HREF Link

Hi All,

PHP Code:
echo "<td>" ."<b>Remote URL:</b> ""<a href = $row3['Remote_URL']></a>" "&nbsp;" ."</td>"


I have this line of code and it gives me an error when I try to run it. What I am trying to do is make the links live when they are pulled from the database. Any help would be greatly appreciated since I am not sure what I am doing wrong.

Reply With Quote
  #2  
Old November 1st, 2012, 08:28 AM
badger_fruit's Avatar
badger_fruit badger_fruit is offline
Confused badger
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Location: West Yorkshire
Posts: 760 badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 5 h 15 m 18 sec
Reputation Power: 339
Try this instead

PHP Code:
echo "<td>";
echo 
"<b>Remote URL:</b> ";
echo 
"<a href = '{$row3['Remote_URL']}'>URL TEXT GOES HERE</a>";
echo 
"&nbsp;";
echo 
"</td>"
__________________
The number for UK Emergencies is changing, the new number is 0118 999 881 999 119 7253

"For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
- George Orwell, 1984

Reply With Quote
  #3  
Old November 1st, 2012, 08:42 AM
wayne12690 wayne12690 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 26 wayne12690 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 29 m 41 sec
Reputation Power: 0
Quote:
Originally Posted by badger_fruit
Try this instead

PHP Code:
echo "<td>";
echo 
"<b>Remote URL:</b> ";
echo 
"<a href = '{$row3['Remote_URL']}'>URL TEXT GOES HERE</a>";
echo 
"&nbsp;";
echo 
"</td>"


I am no longer getting an error message but I now am not getting anything to return for this. The page loads but the URL is not present. Any ideas?

Reply With Quote
  #4  
Old November 1st, 2012, 08:43 AM
badger_fruit's Avatar
badger_fruit badger_fruit is offline
Confused badger
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Location: West Yorkshire
Posts: 760 badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 5 h 15 m 18 sec
Reputation Power: 339
Does $row3['Remote_URL'] actually contain anything?
Echo it and find out, if not then look at where it should get data from and investigate from there.

Reply With Quote
  #5  
Old November 1st, 2012, 08:46 AM
wayne12690 wayne12690 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 26 wayne12690 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 29 m 41 sec
Reputation Power: 0
Quote:
Originally Posted by badger_fruit
Does $row3['Remote_URL'] actually contain anything?
Echo it and find out, if not then look at where it should get data from and investigate from there.


Yes it does contain values. Previously this webpage worked fine, I just wanted to add functionality by adding live links instead of just text.

Reply With Quote
  #6  
Old November 1st, 2012, 08:48 AM
badger_fruit's Avatar
badger_fruit badger_fruit is offline
Confused badger
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Location: West Yorkshire
Posts: 760 badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 5 h 15 m 18 sec
Reputation Power: 339
Try replacing the line:-
echo "<a href = '{$row3['Remote_URL']}'>URL TEXT GOES HERE</a>";

With:-
echo "<a href = '{$row3['Remote_URL']}'>{$row3['Remote_URL']}</a>";
Comments on this post
wayne12690 agrees!

Reply With Quote
  #7  
Old November 1st, 2012, 08:51 AM
wayne12690 wayne12690 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 26 wayne12690 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 29 m 41 sec
Reputation Power: 0
Quote:
Originally Posted by badger_fruit
Try replacing the line:-
echo "<a href = '{$row3['Remote_URL']}'>URL TEXT GOES HERE</a>";

With:-
echo "<a href = '{$row3['Remote_URL']}'>{$row3['Remote_URL']}</a>";


That was it!!!!!! Thank you so much for your help as always!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - PHP HREF Link

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap