| | |
Help me .....
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jun 2008
Posts: 145
Reputation:
Solved Threads: 0
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 Syntax (Toggle Plain Text)
<?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(); ?>
•
•
Join Date: Nov 2007
Posts: 183
Reputation:
Solved Threads: 5
hope this works.plz reply
PHP Syntax (Toggle Plain Text)
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(); ?>
![]() |
Other Threads in the PHP Forum
- Previous Thread: Is the syntax is correct..
- Next Thread: code to find out holidiays in a month
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code confirm cron curl customizableitems database date directory display download dynamic echo email error external file files folder form forms forum function functions google headmethod href htaccess html iframe image include insert integration ip java javascript joomla limit link login loop mail malfunction menu mlm mod_rewrite multiple mysql oop parse paypal pdf php play problem query question radio random recursion regex remote script search server sessions shopping sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video web xml youtube





