bhavin_85 Posted February 16, 2007 Share Posted February 16, 2007 Hi guys i have created my webpage and all the session variables are working but i have 1 question, can i set individual font for the text that is displayed by session varaibles...currently i have set the text color in the body and all of the information on the page is displayed in that colour. However i want to print different variables in different colours. Is it possible to do? ive tried using <font> but it didnt work <? session_start(); if ( empty($_SESSION['username'])){ header("location:default.php"); exit; } ?> <html> <head> <title>P.B.L. Jewellers Ltd</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#030102" text="#666666"> <div> <table width="710" height="546" border="0" align="center" bordercolor="#000000"> <tr> <td><font color="#0000FF">sdfsdfs</font> <? echo "You are logged in as " . $_SESSION['uname'] . ""?> </td> </tr> <tr> <td colspan="3"> <img src="images/banner2.png" width="710" height="158" align="top"> </td> </tr> <tr> <td colspan="3" align="center"><? readfile("menu.inc"); ?> </td> </tr> <tr> <td><br><? echo "Hello " . $_SESSION['first_name'] . "" ?></td> </tr> <tr> <td><p> </p> Personal Information <br> <? echo "Customer ID: " . $_SESSION['cust_id'] . "<br>"; echo "Name: " . $_SESSION['first_name'] . " " . $_SESSION['surname'] . "<br>"; echo "Address: " . $_SESSION['address1'] . ", " . $_SESSION['address2'] . "<br>"; echo "Town: " . $_SESSION['town'] . "<br>"; echo "County: " . $_SESSION['county'] . "<br>"; echo "Postcode: " . $_SESSION['postcode'] . "<br>"; ?> any help is much appreciated Link to comment https://forums.phpfreaks.com/topic/38802-setting-font-with-session-variables/ Share on other sites More sharing options...
paul2463 Posted February 16, 2007 Share Posted February 16, 2007 you could use a session variable called $_SESSION['bgcolour'] = "#030102" etc then include that in the page $bgcolour = $_SESSION['bgcolour']; $textcolour = $_SESSION['textcolour']; <body bgcolor="<?php echo $bgcolour ?>" text="<?php echo $textcolour ?>"> or just use CSS Link to comment https://forums.phpfreaks.com/topic/38802-setting-font-with-session-variables/#findComment-186524 Share on other sites More sharing options...
bhavin_85 Posted February 16, 2007 Author Share Posted February 16, 2007 i guess ill have to figure out how to make a css, ive never used them before....are they easy to pick up? Link to comment https://forums.phpfreaks.com/topic/38802-setting-font-with-session-variables/#findComment-186550 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.