Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Why isn't my mailto: link not working in php page?
Closed Thread
Old 08-02-2009, 05:45 PM   #1 (permalink)
Chad711's Avatar
 
Monster Techie

Join Date: Oct 2008

Location: Irving, TX

Posts: 1,175

Chad711 is on a distinguished road

Default Why isn't my mailto: link not working in php page?

I'm new to all this and I keep getting errors when I try to add a mailto: link.

Here is the code:

PHP Code:
<?php

/* comment... */

if (!isset($index)) { header("Location: ../"); }

/* comment... */

$title "Contact Us";



/* comment...*/

$content "
<p class='subtitle'>Staff</p>
<a href="
mailto:XXXXX">Email Admin</a>

<br> 


"
;

?>

__________________
Q6600 OC 3.0, 4870 1GB,750w, 4GB DDR2, T-Power I45, Extreme Audio X-Fi OS: Windows7-64-Pro, Contact Core Freezer, Acer G24"/LG 22"

Last edited by Chad711; 08-02-2009 at 10:35 PM.
Chad711 is offline  
Old 08-02-2009, 06:06 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default Re: Why isn't my mailto: link not working in php page?

by using double quotes around the href attribute, you are terminating a string in php code. change the double quotes around the mailto to single quotes and you should be ok.
like what is done around the 'p class'
office politics is offline  
Old 08-02-2009, 06:58 PM   #3 (permalink)
Chad711's Avatar
 
Monster Techie

Join Date: Oct 2008

Location: Irving, TX

Posts: 1,175

Chad711 is on a distinguished road

Default Re: Why isn't my mailto: link not working in php page?

Thanks! I rep'd you
__________________
Q6600 OC 3.0, 4870 1GB,750w, 4GB DDR2, T-Power I45, Extreme Audio X-Fi OS: Windows7-64-Pro, Contact Core Freezer, Acer G24"/LG 22"
Chad711 is offline  
Old 08-02-2009, 07:34 PM   #4 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default Re: Why isn't my mailto: link not working in php page?

i would edit the original thread to omit the email address. bots may scrape it off this page.

thanks for the rep. Cheers!
office politics is offline  
Old 08-02-2009, 10:35 PM   #5 (permalink)
Chad711's Avatar
 
Monster Techie

Join Date: Oct 2008

Location: Irving, TX

Posts: 1,175

Chad711 is on a distinguished road

Default Re: Why isn't my mailto: link not working in php page?

good thinking! Thanks again
__________________
Q6600 OC 3.0, 4870 1GB,750w, 4GB DDR2, T-Power I45, Extreme Audio X-Fi OS: Windows7-64-Pro, Contact Core Freezer, Acer G24"/LG 22"
Chad711 is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Top SEO Techniques Yek Search Engines & Internet Traffic 12 12-31-2008 07:47 PM
Php Redirecting Using Cookies Hatter Madigan Programming Discussions 5 07-18-2008 04:17 PM
Calling all PHP and MySql experts murdocsvan Programming Discussions 4 04-17-2008 01:51 PM
PHP Coding Pat_pet Programming Discussions 8 03-26-2008 06:41 AM