I know there are many post about displaying a image from mssql, but they seems dont work in my case if i want it display with other table items.
I can display the binary image indivially by the following code
echo $image=base64_decode($MyBinImg);
then when i wanted to display the image into a table using smarty, it doesnt work
php side:
$smarty->assign("Photo",$image);
$smarty->assign("SomeText","hello world");
tpl side:
<some tags>
..
...
<tr>
<td style="background-color: #d0d0d0;"><b>TEXT</b></td>
<td style="background-color: #f0f0f0;">{$SomeText}</td>
</tr>
<tr>
<td style="background-color: #d0d0d0;"><b>Photo</b></td>
<td style="background-color: #f0f0f0;"><img src="{$Photo}"/></td>
</tr>
The table can display SomeText but not the Photo.
Can someone tell me how to display it.Thanks.
try this:
<img src="data:image/jpeg;base64,/{$Photo}"/>
Related
Is it possible somehow to color "company_owner" by the code which user_color holds? That when you open select list, for the sample: Richerson, Rick would be colored by the code which user table has user_color.
$q->addQuery('user_id');
$q->addQuery('user_color');
$q->addQuery('CONCAT_WS(", ",contact_last_name,contact_first_name)');
<tr>
<tr>
<td align="right">
<?php echo $AppUI->_('Kompanijos savininkas'); ?>:
</td>
<td>
<?php
echo arraySelect($owners, 'company_owner', 'size="1" class="text"',
((#$obj->company_owner) ? $obj->company_owner : $AppUI->user_id));
?>
</td>
</tr>
Fetch the content in user_table, register it into a var and parse it in html or in css, don't know how do that in mysqli but if you want I can write it in mysql
I'm new to fpdf and I'm having trouble on how can I display the data based on my input field. In myh input field php file I will put the name,date etc and I have a print button where when I clicked It will automatically print what I inputted in that field. Now I want that to be printed in a table form format. Below is the fpdf file:
<?php
$html = <<<MYTABLE
<table border="1" style="width:90%" title="Leave" cellpadding="5px" align="center">
<tr>
<td rowspan=1 width="70" align:"top-left"><center><b>1. Name:</b></center><br><select name="office_agency"></td>
<td rowspan=1 width="100" colspan="2" align:"top-left"><b>2. ID / Date</b><br> </td>
</tr>
<tr>
......
</tr>
</table>
MYTABLE;
require('pdftable.inc.php');
mysql_connect('localhost','root','');
mysql_select_db('auth');
$p = new PDFTable();
$p->AddPage();
$p->setfont('times','',10);
$p->Cell(5,-5,'APPLICATION FOR LEAVE');
$p->Ln(3);
$p->htmltable($html);
$p->output();
?>
There. how can put the code for fetching the inputted data following the html format or is there any way than this? thanks
Here you cannot use the html table for direct display,you can create the table using the col() syntax for more check this link [here]
http://www.fpdf.org/en/script/script14.php
For my uni project i have created a website for my local rugby team...
I have a database of players and in that database i have a column for profile picture. I was told to just put the path to the image in the player record which i did. The photo doesnt load just the line i put it there. The path i inserted below....
H:\WebDesign2\Xampp\htdocs\BedlinogRFC\images\Benji.jpg
Below is my dreamweaver code:
<div class="playerProfilePhotoContainer">
<table height="250" width="299" border="0" cellpadding="3">
<caption>
Player Photo
</caption>
<tr>
<td><img src="<?php echo $row_Recordset1['ProfilePhoto']; ?>" alt="Profile Photo of Player"/></td>
</tr>
</table>
</div>
Can anybody show me where i am going wrong or where i need to change?
Thanks
This:
<td height="235"><?php echo $row_Recordset1['ProfilePhoto']; ?></td>
Should be:
<td height="235"><img src="<?php echo $row_Recordset1['ProfilePhoto']; ?>" alt=""/></td>
I have a database of players and their info in mysql. I have created a table in dreamweaver displaying all the players and their info. I want to display a player profile (which is stored in mysql) seperate from this table and want this information to change when the mouse is over a player in the table.
Is this possible and how do i go about it? Any help or links to tutorials will be greatly received!
I have a Screenshot of my page but am unable to post due to reputation if anyone wants to visualise my idea maybe i could send it them?
<div class="playerInfoContainer">
<table width="95%" border="0" cellpadding="3">
<caption>
Player Profile
</caption>
<tr>
<td><?php echo $row_Recordset1['PlayerProfile']; ?></td>
</tr>
</table>
</div>
</div>
<div class="squadListContainer">
<div class="DatabaseContainer">
<table width="95%" border="0" cellpadding="3">
<caption>
Bedlinog Veterans Squad
</caption>
<tr>
<th scope="col">Player Name</th>
<th scope="col">Position</th>
<th scope="col">Date of Birth</th>
<th scope="col">Points Tally</th>
<th scope="col">Man of the Matches</th>
</tr>
<?php do { ?>
<tr>
<td width="130"><?php echo $row_Recordset1['PlayerName']; ?></td>
<td width="100"><?php echo $row_Recordset1['Position']; ?></td>
<td width="100"><?php echo $row_Recordset1['DateOfBirth']; ?></td>
<td width="100"><?php echo $row_Recordset1['PointsTally']; ?></td>
<td width="100"><?php echo $row_Recordset1['MOM']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</div>
Firstly, pre-build all of the displayed mouse-over data into separate XML/JSON files. That way there's no load on a database to display 15 items at once when someone goes nuts with their cursor.
Secondly, use jquery to display a mouseover event to populate a div on the page with the separate HTML files.
As long as your jquery is correct and your css skills are up to snuff, the details will change as required and maintain the correct look/feel as it goes from one 'team/squad' to the next.
I made some images which i need, currently i have :
$output .= "
<tr>
<td align='center'><b>{$name}</b></td> </tr>
<tr>
<td align='center'><img src='$avatar'/></td> </tr>
<td align='center'><b>Points</b>: {$points}</td> </tr>
<tr>
<td align='center'><b>Status</b>:<b><font color='green'> {$misc['text_status']}</font></b></td> </tr>
<tr>
<td align='center'><a href='".$link."'><font color='red'><b>See more statistics</b></font></a><hr></td></tr>
";
with script i get this(ie image) http://img717.imageshack.us/img717/7885/thisdn.png .
Now i need to output something like this http://img703.imageshack.us/img703/171/thatq.png (ie image) without mysql. May i have some examples of yours?
move <tr> before your for loop and </tr> after you for loop
or better one, place individual tables with float:left for each member
You could try to wrap every profile information (photo, points etc) in a div and not use tables at all. Then float these div-s to the right or left. Note that every div must have the same class.