0

hi i had this script created by a php coder and it worked on another site of mine with same software but now its not working on current site can someone check it out heres code much appreicated

Registartion3.php

<table width="750" cellspacing="5">
   <tr>
         <td></td>
      <td></td>
      <td></td>
      <td></td>

          <?php 
          $multiple = mysql_query("select * from checkboxes order by id asc");
            $i=0;
            while($multipleCheck = mysql_fetch_array($multiple)) { 
            if($i%4==0){
                echo "</tr><tr>";
                }
            ?>
<td width="200">
<input type="checkbox" name="checkbox[]" value="<?php echo $multipleCheck['id'];?>" /> 
<label><?php echo $multipleCheck['name'];?></label></td>

            <?php
            $i++;
            }
        ?>  


      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    </table>

profile.php

<table>
        <p> </p>
 <hr />

      <p> </p>
      <b>Your Interests Are:</b><br />

<p></p>
       <?php 

       $mynumber = mysql_query("select * from multiplecheck where userid='$_SESSION[last_id]' ");
      // echo $mynumber;
      while($mynumberGet = mysql_fetch_array($mynumber))
      {
        // echo "select * from checkboxes where id ='$mynumberGet[checkid]'";
          $checkBox = mysql_fetch_array(mysql_query("select * from checkboxes where id ='$mynumberGet[checkid]'"));
          ?>
       <?php echo $checkBox['name']."<p></p>";?>
     <?php
      }
       ?>

       </table>  

database tables without the inserts

CREATE TABLE IF NOT EXISTS `multiplecheck` (
      `id` int(11) NOT NULL,
      `userid` int(11) NOT NULL,
      `checkid` int(11) NOT NULL
    ) ENGINE=MyISAM AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `checkboxes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2
Contributors
3
Replies
11
Views
2 Years
Discussion Span
Last Post by diafol
0

deprecated mysql_*
mashed-up php and html
even DB calls/SQL in the middle of markup

If you paid for it, grab him by the proverbials and shake him vigorously. This is very messy and I'm afraid it's making my eyes hurt. Anybody else?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.