dcibrando Posted March 9, 2008 Share Posted March 9, 2008 How do I change the text font and size in this? Everytime I try something...the page wouldn't work anymore. New Members is being called on another page like this <?=new_members();?> - thanks! function new_members() { $q1 = "select * from classmates_members where profile_image = '' order by MemberID limit 0,3 "; $r1 = mysql_query($q1) or die(mysql_error()); $n = mysql_num_rows($r1); $rows = "<table width=\"320\" cellspacing=0 cellpadding=0 align=center>\n<tr>\n\t<td height=20> </td>\n</tr>\n\n"; if($n > '0') { while($a1 = mysql_fetch_array($r1)) { $sizes = getimagesize("profile_images/$a1[profile_image]"); //define the type - lendscape or portrait if($sizes[0] > $sizes[1]) //landscape (97 x 64) { if($sizes[1] > 97) { $show_size = "whidth=97"; } else { $show_size = "width=$sizes[0]"; } } else //portrait { if($sizes[1] > 64) { $show_size = "height=64"; } else { $show_size = "height=$sizes[1]"; } } $profile_image = "<table align=center width=100 cellspacing=0 cellpadding=0 border=0><tr>\n\t<td width=13 height=17>\n\t<td width=87 valign=top height=16></td>\n\t<td width=17 height=17></td>\n</tr>\n\n<tr>\n\t<td width=13></td><td align=center> <img src=profile_images/$a1[profile_image] height=100 alt=\"Current name: $a1[CurrentName]\nFormer name: $a1[FormerName]\"></td>\n\t<td width=17></td>\n</tr>\n\n<tr>\n\t<td width=13 height=21></td>\n\t<td width=87 height=21></td>\n\t<td width=17 height=21></td>\n</tr>\n\n</table>"; $rows .= "<tr>\n\t<td OnMouseOver=\"this.style.cursor='hand'\" OnClick=\"window.open('profile.php?id=$a1[MemberID]', '_self');\" width=331 align=center valign=top>\n\t<table cellspacing=0 cellpadding=0 border=0 width=300 align=center>\n\t<tr>\n\t\t\n\t\t<td width=200>Name: $a1[CurrentName] Graduated in: $a1[year] <p> </td>\n\t</tr>\n\t</table>\n\n</td>\n</tr>\n\n"; } } Quote Link to comment Share on other sites More sharing options...
uniflare Posted March 10, 2008 Share Posted March 10, 2008 if($sizes[1] > 97) { $show_size = "whidth=97"; } should be: if($sizes[1] > 97) { $show_size = "width=97"; } ---- to change font, im not sure where you want to change the font but ill give an example: $rows .= "<tr>\n\t<td OnMouseOver=\"this.style.cursor='hand'\" OnClick=\"window.open('profile.php?id=$a1[MemberID]', '_self');\" width=331 align=center valign=top>\n\t<table cellspacing=0 cellpadding=0 border=0 width=300 align=center>\n\t<tr>\n\t\t\n\t\t<td width=200><font name=\"comic sans ms,verdana,arial\" size=\"15px\">Name: $a1[CurrentName] Graduated in: $a1[year] <p> </font></td>\n\t</tr>\n\t</table>\n\n</td>\n</tr>\n\n"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.