I cannot get this table to work even though i hav eit working PERFECTLY in 3 other instances, now what i dont get is it seems to be a connection issue between the database and the form, now that makes some sense to me. What doesnt make sense is when i do the exact solution to connect it to the database, it doesnt work at all. what gives!

<?php mysql_select_db('numbers', mysql_connect('localhost','root',''))or die(mysql_error());?>

<html>
        <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="screen">

        <link rel="stylesheet" type="text/css" href="css/DT_bootstrap.css">

<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.js" type="text/javascript"></script>

<script type="text/javascript" charset="utf-8" language="javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8" language="javascript" src="js/DT_bootstrap.js"></script>


<form method="post">
<div class="row-fluid">
        <div class="span12">

            <div class="container">
            <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">

            <div class="alert alert-info">

            <center>                  
            <strong><i class="icon-user icon-large"></i>&nbsp;Uploaded Files</strong>
            </center>

            </div>
            <thead>

                <tr>

                  <th>File Name</th>
                  <th>Upload Date</th>
                  <th>Upload Time</th>

                  </tr>
              </thead>
              <tbody>
              <?php 
              $query=mysql_query("select * from upfiles")or die(mysql_error());
              while($row=mysql_fetch_array($query)){
              $id=$row['id'];
              ?>

                    <tr>

                     <td><?php echo $row['filename'] ?></td>
                     <td><?php echo $row['update'] ?></td>
                     <td><?php echo $row['uptime'] ?></td>

                    </tr>

              <?php } ?>
              </tbody>
              </table>
          </div>
      </div>
  </div>
</form>
</html>

here is my table, why isnt it connecting to the database??? why is this different while the others are exactly alike and they work fine?

do you get any error messages?

no, no error messages at all, just no result :/

Member Avatar for iamthwee

semicolon missing maybe.

no ive gone over it pretty closely, found nothing missing.

Member Avatar for iamthwee

I can see three missing.

I tried that, putting the three semi Colons at the end of my echo lines but they arent there in my other tables and they work just fine, plus it yielded the same result. I even tried moving some of the html around but NOTHING, its gotta be where it cant access the database, but why cant it? I dont see how this is any different execpt MAYBE where this table is along side another html file for uploading, but that shouldnt make any difference.

Member Avatar for iamthwee

Post the code that works that as you say is exactly the same.

here it is

</head>

    <div class="row-fluid">
        <div class="span12">


            <div class="container">


<br><br>
                            <form method="post">
                        <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">

                            <div class="alert alert-info">

                                <strong><i class="icon-user icon-large"></i>&nbsp;Do Not Call Information From User Submitted Data</strong>

                            </div>
                            <thead>

                                <tr>

                                    <th>Employee Name</th>
                                    <th>First Name</th>
                                    <th>Last Name</th>
                                    <th>Email Address</th>
                                    <th>Customer Address</th>
                                    <th>Phone Number</th>
                                    <th>Date Added</th>
                                    <th>Time Added</th>
                                    <th>Accidental Calls</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php 
                            $query=mysql_query("select * from usernumdata")or die(mysql_error());
                            while($row=mysql_fetch_array($query)){
                            $id=$row['id'];
                            ?>

                                        <tr>

                                         <td><?php echo $row['empname'] ?></td>
                                         <td><?php echo $row['firstname'] ?></td>
                                         <td><?php echo $row['lastname'] ?></td>
                                         <td><?php echo $row['email'] ?></td>
                                         <td><?php echo $row['streetadd'], " ", $row['city'], " ", $row['state'], " ", $row['zip'], " ", $row['prov'] ?></td>
                                         <td><?php echo $row['numb'] ?></td>
                                         <td><?php echo $row['date'] ?></td>
                                         <td><?php echo $row['time'] ?></td>
                                         <td><?php echo $row['called'] ?></td>
                                </tr>

                                  <?php } ?>
                            </tbody>
                        </table>

</form>

sadly it is identical, :/

I figured out the issue, i was posting twice on the same page, not allowed so i fixed it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.