Hi,
I e-mailed this before, but the attachments didnt go through. I am
designing something that my tech team can use to track the maintenancing
of our school district computers. I have a table of data (formitems)
that contains tasks that must be completed for that computer depending
on the platform. I loaded the results from the apple.php form into an
array ($item). I need to make a row ($makerow) then, assuming all of
the proper columns are there, load each value in the array into its
corresponding column in the database. For some reason, PHP is not
returning the current value of the array, it is handing MySQL the whole
array.
Any help would be appreciated.
-Tyler
Web and Database Administrator
East Valley School District
?
include './include/dbconnect.php';
include 'accessConnect.php';
include './include/vars.php';
$sql = select * from inventory where ID like $id and notNetworked IS NULL;;
$row = odbc_exec($db, $sql) or die (Could not execute SQL query);
?
html
head
title?= $title ?/title
script language=javascript
function checkAll()
{
?
$sql = SELECT * FROM FORMITEMS WHERE PLATFORM LIKE '%mac%' ORDER BY ID;;
$result = mysql_query($sql);
while($list = mysql_fetch_array($result))
{
echo if(document.form.item$list[id].value == \1\)\n{\ndocument.$list[id].value =
\2\;\n}\n;
}
?
}
/script
/head
body bgcolor=#CBe5Db link=#405266 vlink=#3F593E alink=#3F593E
div align=center
center
table border=0 cellspacing=0 cellpadding=0 width=780
tr
td width=15 height=15img border=0 src=images/corner_tl.gif width=15
height=15/td
td bgcolor=#FF height=15img border=0 src=images/clear.gif
width=1 height=1/td
td width=15 height=15img border=0 src=images/corner_tr.gif width=15
height=15/td
/tr
tr
td bgcolor=#FF width=15img border=0 src=images/clear.gif
width=1 height=1/td
td bgcolor=#FF
table border=0 width=100% cellpadding=0 cellspacing=0
/tr
tr
td valign=top rowspan=3 bgcolor=#C0C0C0
background=images/main_bg.gifimg border=0 src=images/clear.gif width=18
height=1
/td
td valign=topimg border=0 src=./images/logo.png hspace=2
alt=Computer Maintenance align=top
/td
!--WebAdmin Info---
td valign=top align=rightimg src=./images/macos.gif
align=lefttable cellpadding=0 cellspacing=0 border=0trtdApple -
?
echo ID b/tdtdb;
echo $id;
echo /b/td/trtrtdLocation: /tdtdb;
echo odbc_result($row, location);
echo - ;
echo odbc_result($row, roomNo);
echo /b/td/trtrtdTeacher: /tdtdb;
echo odbc_result($row, teacher);
echo /b/td/trtrtdModel: /tdtdb;
echo odbc_result($row, modelNo);
echo /b/td/trtrtdSerial: /tdtdb;
echo odbc_result($row, serialNo);
echo /b/td/trtrtdMac Address: nbsp;/tdtdb;
echo odbc_result($row, macAddress);
echo /b/td/trtrtdDrop: /tdtdb;
echo odbc_result($row, dropID);
echo /b/td/trtrtdOS: /tdtdb;
echo odbc_result($row, OS);
echo /b/td/trtrtdProcessor: /tdtdb;
echo odbc_result($row, processor);
echo /b/td/tr;
echo trtda
href='http://support.evsd.org/webadmin/edit_entry.asp?database=newDBfound=singledeviceNum=1autoNo=;
. odbc_result($row, autoNo) . 'Edit This Info/a/td/tr;
?
/table
!--End WebAdmin Info---
/td
/tr
tr
td valign=bottom colspan=2
img border=0 src=images/clear.gif width=5
height=5
/td
/tr
tr
td valign=top colspan=2
!-Empty Cell---
table border=0 cellpadding=5 cellspacing=7
tr
td valign=top
!-Maintenance Form---
form method=post action=data.php name=form
table
trtd align=bottomNotbrDone nbsp;nbsp;/tdtdN/A
nbsp;nbsp;/tdtdDone/tr/tr
?
$sql = SELECT * FROM FORMITEMS WHERE PLATFORM LIKE '%mac%' ORDER BY ID;;
$result = mysql_query($sql);
while($list = mysql_fetch_array($result))
{
echo trtdinput type=radio name=item$list[id] value=\1\ checked/tdtdinput
type=radio name=item$list[id] value=\2\/tdtdinput type=radio
name=item$list[id] value=\3\/tdtd$list[item]/td/tr\n;
}
?