Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
problem positioning..
Old 05-11-2008, 09:18 PM problem positioning..
Novice Talker

Posts: 5
Name: absolut nod
Trades: 0
database structure


it should display this



PHP Code:
<?php
echo'<form method="post" name="myform" action="file.php">';
$result mysql_query("SELECT iqid, cost, userid FROM ctable where postid=$post");
while (
$row mysql_fetch_array($result))
{
  
$arr[$row['iqid']][$row['userid']] = $row['cost'];
  
$uid[] = $row['userid'];
}
$uid array_unique($uid);
$qid array_keys($arr);
echo 
'<table cellpadding=5><tr><td></td>';
foreach(
$uid as $userid) echo "<td>$userid</td>";
echo 
'</tr>';
    foreach(
$qid as $iqid)
    {
      echo 
"<tr><td>$iqid</td>";
          foreach(
$uid as $userid)
          {
        echo 
'<td>';
            if (isset(
$arr[$iqid][$userid])) echo $arr[$iqid][$userid];
        echo 
'</td>';
        }
      }
$result mysql_query("SELECT cid FROM ctable WHERE postid=$post");
while (
$row mysql_fetch_array($result))
{
echo 
"<input type='checkbox' name='sa[]' value='$row[cid]'>";
}
echo 
"</tr>";
echo 
'</table>';
echo 
'<input type="submit" name="listing" />';
echo
'</form>';    

?>
I've added checkbox and I need to get the cid..
I have problem in positioning, the checkbox appeared in the top of the userid(above userid)
I want the checkbox to appear beside with each cost..
please help me...
abs0lut is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to problem positioning..
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16649 seconds with 12 queries