Jump to content

not getting data


flemingmike

Recommended Posts

anyone able to see if i missed something small?

 

<?php
include "config.php";


echo "<left><br />headlogo
                <table width='96%' cellpadding='1' cellspacing='1' border='1'>
                 <tr>
                  <td width='37%' colspan='4'><b>gname</b></td>
                 </tr>
                 <tr>
                  <td width='25%'>Ladder</td>
                  <td width='25%'>Game</td>
                  <td width='25%'>Join</td>
                  <td width='25%'>Rules</td>
                  
                 </tr>";

$ladders=mysql_query("SELECT id,jobNO,companyID FROM jobno WHERE companyID='$cid' ORDER BY name");
while(list($jid,$jjobno,$jcompanyID)=mysql_fetch_row($ladders)){

echo "
<tr>
     <td width='25%'>$jid</td>
     <td width='25%''>$ccompany</td>
     <td width='25%'>$caddress</td>
     <td width='25%'>$jjobno</td>
     </tr>";
}
echo "</table></left>";
}
echo "<br /><br />";

?>

Link to comment
Share on other sites

oops.. sorry

 

<?php
include "config.php";


echo "<left><br />headlogo
                <table width='96%' cellpadding='1' cellspacing='1' border='1'>
                 <tr>
                  <td width='37%' colspan='4'><b>gname</b></td>
                 </tr>
                 <tr>
                  <td width='25%'>ID</td>
                  <td width='25%'>Company ID</td>
                  <td width='25%'>Job Number</td>
                  
                 </tr>";

$result = mysql_query("SELECT * FROM jobno");
while($row = mysql_fetch_array($result))
  {

$jid=$row["ID"];
$jjobno=$row["jobNO"];
$jcompanyid=$row["companyID"];


echo "
<tr>
     <td width='25%'>$jid</td>
     <td width='25%''>$jcompanyid</td>
     <td width='25%'>$jjobno</td>
     </tr>";

echo "</table></left>";
}
echo "<br /><br />";

?>

Link to comment
Share on other sites

another question, if i break out of php for a form, how can i have the form display a php variable?

 

here is what im trying:

 

$d = date("d");
$m = date("m");
$y = date("Y");


?>


<form method="post">
Month: <select size="1" name="M">
<option selected><?php '$m' ?></option>
<option>1</option><option>2</option>

Link to comment
Share on other sites

it isnt blank.  if i do a print '$m'; at the end of the form, it displays.

 

<?php
include 'config.php';


$d = date("d");
$m = date("m");
$y = date("Y");


?>


<form method="post">
Month: <select size="1" name="M">
<option selected><?php "$m"; ?></option>
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option>
<option>9</option><option>10</option><option>11</option><option>12</option></select> 
Day: <select size="1" name="D">
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</

option><option>10</option><option>11</option>option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</opt

ion><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option

><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option></select> 
Year: <select size="1" name="Y">
<option>2010</option><option>2011</option></select>   
<input name="add" type="submit" id="add" value="GO"> 
</form>

<?php



echo "<table border='1'>
<tr>
<th>ID</th>
<th>Name</th>
<th>Job Number</th>
<th>Date</th>
</tr>";
$result = mysql_query("SELECT * FROM staff WHERE date >= '".date('Y-m-d').' 00:00:00'."' AND date < '".date('Y-m-d').' 23:59:59'."' ");
while($row = mysql_fetch_array($result))
{


  echo "<tr>";
  echo "<td>" . $row["ID"] . "</td>";
  echo "<td>" . $row["Name"] . "</td>";
  echo "<td>" . $row["jobNO"] . "</td>";
  echo "<td>" . $row["Date"] . "</td>";
  echo "</tr>";
  }
echo "</table>";





?>

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.