WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2004, 09:46 AM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default MySQL Inserting email field

Hi I have a php/mysql database I have added a field for email but it is not clickable.

One of the standard fields is for URLs and this clicks through.

How can I make my email field clickable.

I have limited sql knowledge but I can find my way around using phpMyAdmin

Any ideas?
Reply With Quote
  #2 (permalink)  
Old 03-15-2004, 07:34 PM
WebProWorld Pro
 

Join Date: Jul 2003
Location: Chilliwack, BC Canada
Posts: 190
blastradius RepRank 0
Default

Are you wanting to be able output the email to a web page with a clickable email or you wanting to be able to have a clickable email within the gui of an mySQL addon.

I'm not sure of the later might depend on the gui program you downloaded. But the first can be done by putting the email address in a the field.

then write that field into the middle on the your a tag. ie >email me
__________________
http://www.freshfire.ca
Reply With Quote
  #3 (permalink)  
Old 03-16-2004, 05:31 AM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default

Hi yes I want to output the email to a web page

The programme is a review programme and the following is an example

Review
Name joe blog
address blog street
URL. www.blog.com (this clicks through to the website)
email: joeblog@blog.com (this I want clickable)
Reply With Quote
  #4 (permalink)  
Old 03-16-2004, 07:07 AM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default

Code:
"; if ( $config_field_1 != "" ) { echo "" . $config_field_1 . ""; $field_1 = true; }
Where would the following go?

Code:
<a href=mailto:<?php echo $email ?>>email me
Or am I on the wrong track totally
Reply With Quote
  #5 (permalink)  
Old 03-17-2004, 06:47 PM
WebProWorld Pro
 

Join Date: Jul 2003
Location: Chilliwack, BC Canada
Posts: 190
blastradius RepRank 0
Default

I'm not sure of all you are testing for. But lets say $config_field1 is your email field in the database

if ( $config_field_1 != "" );
{echo "<a href=mailto" $config_field_1 ">email me</a>

I use PHP very little so my syntax maybe a little off but the logic is correct
__________________
http://www.freshfire.ca
Reply With Quote
  #6 (permalink)  
Old 04-05-2004, 05:49 AM
Nargule's Avatar
WebProWorld Member
 

Join Date: Nov 2003
Location: Gainesville, FL, USA, Earth, MilkyWay
Posts: 84
Nargule RepRank 0
Default

Quote:
Originally Posted by blastradius
I'm not sure of all you are testing for. But lets say $config_field1 is your email field in the database
Code:
if ( $config_field_1 != "" ); 
    {echo "<a href=mailto" $config_field_1 ">email me</a>
I use PHP very little so my syntax maybe a little off but the logic is correct
Whoa! That syntax threw the forum for a loop.

You ought to be able just to do this:
Code:
if ($config_field_1 != "")
{
  echo "<a href=mailto:$config_field_1>$config_field_1</a>";
  $field_1 = true;
}
PHP will deal with the variable in the double quotes.

p.s. I'm not sure what the if ($config_field_1 != "") is all about, just use if ($config_field_1) instead.
__________________
Tom Corwine

Please review my site at http://www.santaslane.com?source=WebPro
and be sure to check out http://www.corwine.tv <--- It's fixed now.
Reply With Quote
  #7 (permalink)  
Old 04-06-2004, 05:45 PM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 54
tenaki RepRank 0
Default

This is a link to the page which shows the email address as text.

The config_field" is a field that either myself or a member can fill in.

I believe that it is configerable to allow it to show as a search option or not.

I am starting to wonder if it would be better just to make a new field?


http://www.touringandtenting.com/cam...sub_cat_id=153
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: , , ,



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

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


Search Engine Optimization by vBSEO 3.2.0