You are here: Re: multiple input boxes « PHP Programming Language « IT news, forums, messages
Re: multiple input boxes

Posted by Auddog on 11/22/06 16:49

"BKDotCom" <bkfake-google@yahoo.com> wrote in message
news:1164213753.254047.213090@j44g2000cwa.googlegroups.com...
>
> please pardon my typos in my post... hopefully you get the idea.
>

Here is where I'm currently at in my programming:

<div align="center">
<table width="300" border="1" cellpadding="4" style='border-collapse:
collapse'>
<tr>
<td width="50" bgcolor="#CCCCCC"><div
align="center"><strong>ID</strong></div></td>
<td width="125" bgcolor="#CCCCCC"><strong>First Name</strong></td>
<td width="125" bgcolor="#CCCCCC"><strong>Last Name</strong></td>
<td width="100" bgcolor="#CCCCCC"><strong>Hours</strong></td>
</tr>

</body>
<?php

include 'config.php';

/*** create a new mysqli object with default database***/
$connection = mysqli_connect($hostname, $username, $password, $dbname) or
die ("Unable to connect");

//create query
$query = "SELECT id, fname, lname FROM prod_employee where active = 'yes'";

//excute query
$result = mysqli_query($connection, $query) or die ("Error in query: $query.
".mysqli_error());

// see if any rows were returned
if (mysqli_num_rows($result) > 0) {
// yes
// print them one after another
while (list($id, $fname, $lname) = mysqli_fetch_row($result))
{
echo " <tr>
<td><div align=center>$id</div></td>
<td>$fname</td>
<td>$lname</td>
<td><input name=hours type=text size=4 maxlength=4 />
</tr>";
}
echo "</table>";
}
else {
// no
// print status message
echo "No rows found!";
}

// free result set memory
mysqli_free_result($result);

// close connection
mysqli_close($connection);

?>

The input box would be the hours input - I'm not sure I catch on to what you
would do. Thanks for the help.

A

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация