PDA

View Full Version : variable HTML



omjo
05-31-2007, 08:28 AM
Hi, i want to put a value from a variable on the screen. How to define the exact position and how to get it on the screen.

Johan

omjo
05-31-2007, 09:36 AM
hi, how do i put a string at a specific position on the screen.

when i write

echo $total;

it is printed at the top of the screen

JOhan

navaldesign
05-31-2007, 11:45 AM
Create a html box in your page. Place the code in the html box. The code must be:

<?
echo $total;
?>

Move the box wherever you want.

You can also format the text as you like, both as font type / size / colour / style and as background. The code would be:

<font style="font-size:15px;BACKGROUND-COLOR:#FFFF00" color="#FF0000" face="Arial"><b><i><u><? echo $total;?></u></i></b></font>

the tags <b> </b> <i> </i> <u> </u> are for Bold, Italics, and Underlined.



Trick: write whatever text you want in BV. Format and colour it as you like. Then rig***lick on the text, and select "html". You will see something like:

<font style="font-size:15px;BACKGROUND-COLOR:#FFFF00" color="#FF0000" face="Arial"><b><i><u>Text to display</u></i></b></font>

Change the part in red with <? echo $total;?> and you are done.

Please note that this is php, so only when the page is published you will be able to see the text, not in preview.

omjo
05-31-2007, 01:11 PM
wow! thanks you soooooo much. its working. :)

Johan