Jump to content

Selecting a specific colum


franknu

Recommended Posts

Ok, I display all the data from the database but what about if after that i want to click certain specific column in the database i have the first page working but i need some help after the user click on the link to see more info about that column

 

here is code for page1

 


$sql="SELECT  * FROM messages
WHERE BusinessName='$BusinessName' ";

$result=mysql_query($sql);

while($row=mysql_fetch_assoc($result))
{
      $messageID = $row['messageID'];
      $date = $row['date'];
      $from =  $row['from'];
  $status = $row['status'];
      $subject = $row['subject'];
      $message =$row['message'];

                   echo"<tr>";
                       echo" <td>";   
				   echo' <input type="checkbox" name="checkbox" value="checkbox"></td>';
                       echo" <td> $date </td>";
                        echo" <td> $from </td> ";
                        echo"<td> $status </td>";
					$ms= $row['subject'];
                        echo"<td><a href='message_display.php?$subject=$ms'>$ms </a></td>";

 

and here is my code for page2

 


if(isset($_GET['message']))
{ 

$sql="SELECT  * FROM messages
WHERE message='$message' ";

$result = mysql_query($sql) or die (mysql_error()); 
$row = mysql_fetch_assoc($result); 



      $messageID = $row['messageID'];
      $date = $row['date'];
      $from =  $row['from'];
  $status = $row['status'];
      $subject = $row['subject'];
      $message = ($row['message']);



				 echo" <table >";
                       echo" <tr> ";
                         echo" <td ><span class='style1'>Mail Center </span></td>";
                         echo" </tr> ";
                       echo" <tr> ";
                         echo" <td>Date</td>";
                        echo"  </tr> ";
                        echo"<tr>";
                       echo " <td>$date </td>";
                       echo  " </tr>";
                     echo"   <tr>";
                       echo"   <td>$from</td>";
                          echo"</tr>";

 

any idea how i can make the second code display the continue values

Link to comment
https://forums.phpfreaks.com/topic/57072-selecting-a-specific-colum/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.