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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.