Advertisement

07.18.2004 at 09:40AM PDT, ID: 21062661
[x]
Attachment Details

Image by each row found...

Asked by Adam89 in PHP and Databases

Tags: , ,

I am making this becausde i have an online radio and i want it so that my visitors can make requests as you can see in my code below...
But the thing is sense I am not going to make an application that plays music as it is requested automatically and I will have Dj's I need a way to delete songs from this page I already have created in which automatically delets them from the database...

ex.

Joe and Moe (2 visitors)
Joe wants to hear Hot in herre by Nelly and Moe wants to hear My band by M&M :-P
They fill out the request form the info gets added to the MySQl database and all is good... :-D
Then the Dj looks at the page I have the code to listed below.
And sees their request so he plays hot in herre and when it is done he has a button that says delete to delete that from the page asn the next song becomes #1 to be played...

How do I get the delete image to show up by each entry?
Please post the code as whole so i do not have to peice it together... Thanks!

(WHAT I HAVE)

<?php
    $host = "localhost";
    $user = "xfactor-";
    $pass = "dexter";
    $db = "xfactor-_goddess";
    $table = "requests";
    $show_all = "SELECT * FROM $table";
      
      //-------------------------+
    //Connect to the server.
      //-------------------------+
      
          mysql_connect("$host", "$user", "$pass")
                  or die (mysql_error ());
      
      //-------------------------+
    //Select the database.
      //-------------------------+
      
          mysql_select_db("$db")
                  or die (mysql_error ());
      
      //-------------------------+
      //Give the page a header.
      //-------------------------+
      
          echo "<b><center>Song Requests</center></b><br><br>";
            
      //$result is now equal to this entire code --mysql_query ($show_all) or die (mysql_error ());--
   
            $result = mysql_query ($show_all)
                  or die (mysql_error ());
            
      //------------------------------------------------------------------+
      //Display The Table And Get The Requests... Get This Party Started!
      //------------------------------------------------------------------+
?>

<center>      
<table width="100%" border="1">
 <tr>
  <td width="13%">Number</td>
  <td width="13%">Artist</td>
  <td width="13%">Song Title</td>
  <td width="13%">Requesters Name</td>
  <td width="35%">Comments</td>
  <td width="13%">Delete</td>
 </tr>
 
<?php
while ($row = mysql_fetch_array ($result)) {
?>

<tr>
  <td>
  <?php echo $row['num']; ?>
  </td>
  <td>
  <?php echo $row['artist']; ?>
  </td>
  <td>
  <?php echo $row['title']; ?>
  </td>
  <td>
  <?php echo $row['name']; ?>
  </td>
  <td>
  <?php echo $row['comments']; ?>
  </td>
 </tr>
 
<?php    
}
?>

</table>
</center>


Once this question is solved I will make a new question and supply all of you with the link so you can help me with my next step...
Then I beleive all my questions will be solved. :-D

Start Free Trial
 
Loading Advertisement...
 
[+][-]07.18.2004 at 10:42AM PDT, ID: 11578564

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2004 at 12:40PM PDT, ID: 11578927

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: php, row, each
Sign Up Now!
Solution Provided By: Diablo84
Participating Experts: 5
Solution Grade: A
 
 
[+][-]07.18.2004 at 03:34PM PDT, ID: 11579614

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2004 at 03:41PM PDT, ID: 11579629

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2004 at 04:17PM PDT, ID: 11579732

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2004 at 04:20PM PDT, ID: 11579744

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2004 at 07:59AM PDT, ID: 11583899

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2004 at 08:05AM PDT, ID: 11583973

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2004 at 11:28AM PDT, ID: 11586018

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.12.2004 at 01:10AM PDT, ID: 11781441

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.12.2004 at 02:55AM PDT, ID: 11781922

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.12.2004 at 11:03AM PDT, ID: 11786528

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.17.2004 at 08:11AM PDT, ID: 11821403

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.21.2004 at 11:13AM PDT, ID: 11860048

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32