View Full Version : Help with <a href . . . </a>
Rob (SA)
05-04-2010, 07:30 PM
Hi FOlks,
I have this script which deos not work properly when inserting the <a href . . tag
echo '</td>
<td bgcolor="#FFFFFF"><font style="font-size:10px" color="#00008B" face="Arial">';
echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
echo '</td><td align="center" bgcolor="#FFFFFF"><font style="font-size:10px" color="#FF0000" face="Arial">';
echo <a href=$row['email']</a>;
Which is in need of attention.
I would like to know how I can get it to work on the two lines reflected above?
Regards
Rob
bluewalrus
05-04-2010, 07:42 PM
Don't use echos for html...
</td>
<td bgcolor="#FFFFFF"><font style="font-size:10px" color="#00008B" face="Arial">';
<option value="<?php echo $row['surname'].', '.$row['name']; ?>"> <?php echo $row['surname'].', '.$row['name'] ;?></option>
</td><td align="center" bgcolor="#FFFFFF"><font style="font-size:10px" color="#FF0000" face="Arial">
<a href="<?php echo $row['email']; ?>"></a>;
Rob (SA)
05-04-2010, 07:52 PM
Hi,
It didnt like the replacement.
Offers a blank screen
bluewalrus
05-04-2010, 08:45 PM
</td>
<td bgcolor="#FFFFFF"><font style="font-size:10px" color="#00008B" face="Arial">';
<option value="<?php echo "$row['surname'], $row['name']"; ?>"> <?php echo "$row['surname'], $row['name']" ;?></option>
</td><td align="center" bgcolor="#FFFFFF"><font style="font-size:10px" color="#FF0000" face="Arial">
<a href="<?php echo $row['email']; ?>"><?php echo $row['email']; ?></a>
How about this? Is the database being executed?
Rob (SA)
05-04-2010, 08:53 PM
Hi,
Here is the balance of the script.
Can be veiwed at this link (http://www.gnjgf.co.za/stevie/players.php)
<?php
$connect = mysql_connect("localhost", "e*****", "H********") or
die ("Hey loser, check your server connection.");
mysql_select_db("*****_Members");
$query1="select * from _Form_Nr_2";
$result=mysql_query($query1) or die(mysql_error());
?>
<!--------THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE------------->
<table border=2 width="85%" bordercolor="#D3E2FE" bordercolorlight="#FFFFFF" bordercolordark="#AFBCDB" style="font-size:12px" cellspacing=0>
<caption><b><font style="font-size:14px" color="#00008B" face="Arial">
MEMBERSHIP DETAILS</font><b><caption>
<tr>
<th bgcolor="#D6D6D8"><b><font style="font-size:11px" color="#00008B" face="Arial">CELL NUMBER</font></b></th>
<th bgcolor="#D6D6D8"><b><font style="font-size:11px" color="#00008B" face="Arial">FULL SURNAME</font></b></th>
<th bgcolor="#D6D6D8"><b><font style="font-size:11px" color="#00008B" face="Arial">EMAIL</font></b></th>
</tr>
<?php
while($row=mysql_fetch_array($result)){
echo '</td><td align="center" bgcolor="#FFFFFF"><font style="font-size:10px" color="#00008B" face="Arial">';
echo $row['cell_phone'];
echo '</td>
<td bgcolor="#FFFFFF"><font style="font-size:10px" color="#00008B" face="Arial">';
echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
echo '</td><td align="center" bgcolor="#FFFFFF"><font style="font-size:10px" color="#FF0000" face="Arial">';
echo $row['email'];
echo "</td></tr>";
if(!isset($counter[$firstNAsAString]))
$counter[$firstNAsAString] = 0;
else
$counter[$firstNAsAString]++;
$last_surname = $row['surname'];
$i++;
echo'</td></tr>';
}
echo "</table>";
?>
bluewalrus
05-04-2010, 11:29 PM
How about this
<?php
$connect = mysql_connect("localhost", "e*****", "H********") or
die ("Hey loser, check your server connection.");
mysql_select_db("*****_Members");
$query1="select * from _Form_Nr_2";
$result=mysql_query($query1) or die(mysql_error());
?>
<style type="text/css">
.result_cell{
font-size:10px;
color:#00008B;
font-family:Arial, Helvetica, sans-serif;
}
.head_cell{
background:#D6D6D8;
font-weight:bold;
color:#00008B;
font-family:Arial, Helvetica, sans-serif;
font-size:11px;
}
h1{
color:#00008B;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
}
.c_align{
text-align:center;
}
.back_color {
background:#FFFFFF;
}
.cell_other{
font-size:10px;
color:#FF0000;
font-family:Arial, Helvetica, sans-serif;
}
</style>
<!--------THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE------------->
<table border=2 width="85%" bordercolor="#D3E2FE" bordercolorlight="#FFFFFF" bordercolordark="#AFBCDB" style="font-size:12px;" cellspacing=0>
<span class="heading">MEMBERSHIP DETAILS</span>
<tr>
<th class="head_cell">CELL NUMBER</th>
<th class="head_cell">FULL SURNAME</th>
<th class="head_cell">EMAIL</th>
</tr>
<?php
while($row=mysql_fetch_array($result)) {
?>
<tr>
<td class="result_cell c_align">
<?php echo $row['cell_phone'];?>
</td>
<td class="cell_other c_align back_color">
<option value="<?php echo $row['surname'] . ', ' . $row['name'];?>"><?php echo $row['surname'] . ', ' . $row['name'];?></option>
</td>
<td>
<?php echo $row['email'];?>
</td></tr>
<?php
if(!isset($counter[$firstNAsAString])) {
$counter[$firstNAsAString] = 0;
} else {
$counter[$firstNAsAString]++;
$last_surname = $row['surname'];
$i++;
?></td></tr>
<?php
}
}
?>
</table>
Rob (SA)
05-05-2010, 11:25 AM
Thanks will give it a look and get back to you later
Regards
Rob
Rob (SA)
05-05-2010, 02:22 PM
Hi,
I have made the changes - we have changed the fonts and colours but not got the effect of <a href . . . .</a>
in that it does not underline the text
result can be seen at www.gnjgf.co.za/stevie/players.php
boogyman
05-05-2010, 04:38 PM
don't use tables for layout, see http://howtocreate.co.uk for more information
bluewalrus
05-05-2010, 04:50 PM
Oh, haha forgot about that, the link code wasnt in your reposted code. Try this one though:
<?php
$connect = mysql_connect("localhost", "e*****", "H********") or
die ("Hey loser, check your server connection.");
mysql_select_db("*****_Members");
$query1="select * from _Form_Nr_2";
$result=mysql_query($query1) or die(mysql_error());
?>
<style type="text/css">
.result_cell{
font-size:10px;
color:#00008B;
font-family:Arial, Helvetica, sans-serif;
}
.head_cell{
background:#D6D6D8;
font-weight:bold;
color:#00008B;
font-family:Arial, Helvetica, sans-serif;
font-size:11px;
}
h1{
color:#00008B;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
}
.c_align{
text-align:center;
}
.back_color {
background:#FFFFFF;
}
.cell_other{
font-size:10px;
color:#FF0000;
font-family:Arial, Helvetica, sans-serif;
}
</style>
<!--------THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE------------->
<table border=2 width="85%" bordercolor="#D3E2FE" bordercolorlight="#FFFFFF" bordercolordark="#AFBCDB" style="font-size:12px;" cellspacing=0>
<span class="heading">MEMBERSHIP DETAILS</span>
<tr>
<th class="head_cell">CELL NUMBER</th>
<th class="head_cell">FULL SURNAME</th>
<th class="head_cell">EMAIL</th>
</tr>
<?php
while($row=mysql_fetch_array($result)) {
?>
<tr>
<td class="result_cell c_align">
<?php echo $row['cell_phone'];?>
</td>
<td class="cell_other c_align back_color">
<option value="<?php echo $row['surname'] . ', ' . $row['name'];?>"><?php echo $row['surname'] . ', ' . $row['name'];?></option>
</td>
<td>
<a href="mailtto:<?php echo $row['email'];?>"><?php echo $row['email'];?></a>
</td></tr>
<?php
if(!isset($counter[$firstNAsAString])) {
$counter[$firstNAsAString] = 0;
} else {
$counter[$firstNAsAString]++;
$last_surname = $row['surname'];
$i++;
?></td></tr>
<?php
}
}
?>
</table>
Rob (SA)
05-07-2010, 06:45 AM
Hi,
Its improving - thanks.
Only requirement now is to make the email address active?
We get the underline aspect to veiw correctly but when I click it does not go and create a pop up to start an email.
Thanks again for you help.
Rob (SA)
05-08-2010, 06:26 AM
Hi,
Please find attached a link / example of a draw
http://www.gnjgf.co.za/DRAW5T.htm
bluewalrus
05-10-2010, 02:49 PM
Remove the "mailto" in the <a href="". where is it suppose to link to?
Rob (SA)
05-10-2010, 04:09 PM
Hi,
I will try it - thank you
Rob (SA)
05-11-2010, 06:13 AM
Hi Chris,
The original script was correct.
The word mailtto should have just been mailto
That side is now sorted - Thank you
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.