Find programmers and grapic design experts at ScriptLance.com
<? DEW-CODE.COM  
Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
adding links (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: adding links
#121
ronaldhoran (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
adding links 8 Months ago Karma: -1  
Help please i have the right forum now for the software

I want to put sme basic links into my header and footer to nav back to the site of origion and verious other afiliated sites only the code i am using is not liked ? i Was inserting
html code ?
<A HREF="http://www.yourdomain.com/">Visit Our Site</A>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#127
Dewed (User)
Administrator
Posts: 250
graph
User Offline Click here to see the profile of this user
Dew-Code.com
Re:adding links 8 Months ago Karma: 7  
Its likely the quotes causing you greif...

They need to be escaped with a backslash in order to be contained in a PHP quoted variable


$html = "A line with quotes in it <br />
<A HREF=\"http://www.yourdomain.com/\">Visit Our Site</A>":


Otherwise PHP has no way of knowing which quote to terminate the variable on
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#148
ronaldhoran (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:adding links 8 Months ago Karma: -1  
thanks give it a go
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#164
jnasta (User)
Senior Boarder
Posts: 70
graphgraph
User Offline Click here to see the profile of this user
Gender: Male John Nasta Photography Location: Brooklyn, NY
Re:adding links 7 Months, 4 Weeks ago Karma: 1  
If I may make a suggestion... If that response doesn't work for you, you might want to consider hiring our host Dewed or one of the other people on this board for whom this would be a simple matter.

What it boils down to is that PHP code is not the same as HTML code. If you look at Dewed's example you will see how the quotes that are used in plain HTML code need to be "escaped" with leading backslashes in order for PHP to interpret them properly.

HTH,
John
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#192
fattymattybrewing (User)
Support Your Local Brewer
Expert Boarder
Posts: 105
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Fatty Matty Brewing Location: Southwestern Wisconsin Birthdate: 1974-11-05
Re:adding links 7 Months, 3 Weeks ago Karma: 3  
that's correct in php code, href's have to be started with a slash like this

Code:

\"http:...\"
the part that is important to remember is the php uses the quote marks and the slash before the quote tells php to "ignore" this quote by doing this...
Code:

\"
another way to think about it is you can add all the html code you want inside of the php code but all your quote must be lead by a
Code:

\
 
Report to moderator   Logged Logged  
 
Lifes Too Short To Drink Crappy Beers
fattymattybrewing.com
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Newsflash

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008