Jump to content

[SOLVED] I take it no one knows this problem?


medaswho

Recommended Posts

am trying to find out why my code prints and extra check box when it shouldn't

 

this is the code:

  if(!$result == "") {

      echo "<h2>some heading.</h2><form>";

    while($title = mysql_fetch_array($result, MYSQL_ASSOC)) {

    $down=$title['title'];

    echo "<input type='checkbox' name='C1' value='ON'>".$down."      ";

                } //end while

              } // end while

 

any advice would be greatly appreciated

thank you 'printf', but the only thing preceding this section of code is an include getting db name variables and then the code to actually connect to the db.

 

include 'variables.dat';

  $quer = "SELECT * FROM thisdb";

  mysql_connect($host,$user,$password);

  mysql_select_db($dbname);

  $result = mysql_query($quer);

and then of course the other stuff...i am baffled?

here is the "view source" printf:

 

<html>

 

<head>

<title>Welcome</title>

</head>

<link rel='stylesheet' type='text/css' href='index.css' />

<body><div id='banner'>

<id='banner' table border='0' width='100%' bgcolor='#FFFFFF'>

  <tr>

    <td width='100%'><p align='center'><img src='images/banner.jpg'></p></td>

  </tr>

</table></div>

<p align='center'>

 

<div id='linkbar'><p align='center'>

  

<a href='index.php'>Home</a>

  

<a href='gigs.php'>Gigs</a>

  

<a href='downloads.php'>Downloads</a>

  

<a href='forum.php'>Forum</a>

  

<a href='contact.php'>Contact</a>

  

 

<a href='about.htm'>About us</a>

</p><h2>some header</h2><form><input type='checkbox' name='' value='ON'>      <input type='checkbox' name='file.mp3' value='ON'>file.mp3      <input type='checkbox' name='file2.mp3' value='ON'>file2.mp3      <br><input type='submit' value='Check out'>   

      <input type='reset'></form><br>

<p><img src='images/cards_flat_smaller.jpg'></p>   

<p> </p>

</div>

</p>

<table id='footer' bgcolor=#ffffff><tr><td>

        Copyright info

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

      </body></html>

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.