body .= link?

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!

Moderator: General Moderators

Post Reply
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

body .= link?

Post by C_Calav »

hi guys,

what is wrong with this?

parse error:

Code: Select all

$body .= "<a href="launch.php?s_id=$s_id;">the survey</a>"
thanx
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Backslashes ;)

Code: Select all

$body .= "<a href="launch.php?s_id=$s_id;">the survey</a>"
... to ...

Code: Select all

$body .= "<a href="launch.php?s_id=$s_id;">the survey</a>"
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

or to make the vars readable when viewing in an editor and such..

Code: Select all

$body .= '<a href="launch.php?s_id='.$s_id.'">the survey</a>'
Not to mention single quotes parse faster than double quotes :P
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

thanx guys,
Not to mention single quotes parse faster than double quotes
thanx didnt know that!
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Phenom wrote:Not to mention single quotes parse faster than double quotes :P

Is that true?
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

ok, now that worked kidna for a php page.

but in the email i recieved,

the link was outputed as this:

Code: Select all

<a href="survey_form.php?s_id=47">the survey</a>
how can i get it to appear as a hyperlink?

thanx
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

you have to send the right headers with the email.. by default emails will show plain text.

Why don't you try searching :P +email +html
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

thanx, i do normally search but the last few weeks when i use the search on this site from work, it just shows a blank page!

i dont think it has anything to do with work as it used to work.

very annoying!
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

C_Calav wrote:thanx, i do normally search but the last few weeks when i use the search on this site from work, it just shows a blank page!

i dont think it has anything to do with work as it used to work.

very annoying!

If your using google, you may have a malware problem (i think thats the word for it)... use a SHREDDER to get rid of it XD

CW Shredder.exe
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

yeah i use google, but the problem is when i use the search on this site
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

what are you searching for.. sometimes if the search is too broad it will hit the max execution time... try limiting your search through recent discussions if neccessary
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

it shows the search results, then when i click a link it goes to a blank white page. the url and everything is there though
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

how many browsers have you tried it in? You've mentioned in a few posts recently about this search problem but I haven't heard it from anybody else.

I believe it could be spyware related. The quickest way to check would be too download the latest version of mozilla and try searching in that browser. If it works then get Adaware from lavasoft.com and run a full scan. I've had the blank page problem before due to spyware / adware or whatever but not on the particular site. When did you last clear your cache too?
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

cool thanx, i will try and download FF at work and ill clear my cache and let you guys know!
Post Reply