-
PHP (
http://www.daniweb.com/forums/forum17.html)
- -
Help me ..... (
http://www.daniweb.com/forums/thread135897.html)
| ishlux | Jul 22nd, 2008 1:33 am | |
| Help me ..... Hi.....here i am able to display only the last row contents.....pls help me......i want to display the rows based on user selection.....here what ever u select it will disply the last row.....
<?php
session_start();
include('database.php');
$result = mysql_query("SELECT * FROM autoalto_mail" );
while($row = mysql_fetch_array($result))
{
?>
<tr><td width="10%"></td>
<td ><img src="images/buldot.gif" alt="" height="6" width="6">
<?echo $row['from']?></td>
<td >
<a href="contractor_mail_action_contents.php?mail_id=<? $mailid=$row['mail_id'];
session_register("mailid");
?>">
<?
session_start();
include('database.php');
$mailid1 = $_SESSION['mailid'];
echo $mailid1;
$query1="SELECT * FROM autoalto_mail where mail_id='".$mailid1."'" ;
//echo $query1;
$result = mysql_query( $query1 );
//echo mysql_num_rows($result) ;
while($row = mysql_fetch_array($result))
{
echo $row['contents'];
}
mysql_close();
?>
|
| lydia21 | Jul 22nd, 2008 1:49 am | |
| Re: Help me ..... hope this works.plz reply
while($row = mysql_fetch_array($result))
{
?>
<tr><td width="10%"></td><td ><img src="images/buldot.gif" alt="" height="6" width="6"><?echo $row['from']?></td>
<td >
<a href="contractor_mail_action_contents.php?mail_id=<? echo $row['mail_id']; ?>">
<? session_start(); include('database.php');
$mailid1 = $_GET['mail_id'];
$query1="SELECT * FROM autoalto_mail where mail_id=$mailid1" ;
$result = mysql_query( $query1 );
while($row = mysql_fetch_array($result))
{
echo $row['contents'];
}mysql_close(); ?> |
| ishlux | Jul 22nd, 2008 1:57 am | |
| Re: Help me ..... Thanks a lot ..........its working,,,,,,,,i was struggling from yesterday....... |
| lydia21 | Jul 22nd, 2008 1:57 am | |
| Re: Help me ..... welcome............mark it as solved |
| All times are GMT -4. The time now is 2:11 pm. | |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC