Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,473
There are 1776 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

PHP Results issue

Thread title: PHP Results issue
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
12-09-2008, 10:45 AM
#1
Kimb3r is offline Kimb3r
Status: I'm new around here
Join date: Apr 2008
Location:
Expertise:
Software:
 
Posts: 8
iTrader: 0 / 0%
 

Kimb3r is on a distinguished road

  Old  PHP Results issue

Im looking to make a members type page that when you click on the member name (coming from an SQL database) it will then go to their page where for now their name will appear. I have it all working except on their page it just outputs all the names from the database. Example: http://xyzmedia.co.uk/wow/test.php

Code:
Code:
<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">
  <tr>
    <td width="44%" valign="top"><p>Name:</p>
        <? mysql_connect("localhost", "admin", "*******") or die(mysql_error());
mysql_select_db("members") or die(mysql_error());

$result = mysql_query("SELECT * FROM members order by name") or die (mysql_error());
while ($row = mysql_fetch_array($result)) 			

{
echo "<a href='?id=" . $row[name]	."'>" . $row[name]	."</a><br />";
}
?>
        <p><br />
          Add Your Name </p>
        <form action="addmember.php" method="post" name="addmember" id="addmember">
          <input type="text" id="name" name="name" value="" />
          <input name="submit" type="submit" value="Add" />
      </form></td>
    <td width="56%" valign="top"><? mysql_connect("localhost", "admin", "*******") or die(mysql_error());
mysql_select_db("members") or die(mysql_error());

$result = mysql_query("SELECT * FROM members order by name") or die (mysql_error());
while ($row = mysql_fetch_array($result)) 			

{
		echo "" . $row[name]	."";	
}
?>
    </td>
  </tr>
</table>

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed