Answered step by step
Verified Expert Solution
Question
1 Approved Answer
take the form and loop through an array to save all values in the form. code: query ( $sql ) ; $database - > bind
take the form and loop through an array to save all values in the form.
code:
query$sql;
$databasebind:id $id;
$databaseexecute;
$rows $databaseobject;
foreach$rows as $key$valecho $val
;
for loop for the form
echo "saved. please make sure that the informztion is correct.
;
echo $id
;
echo $JobNumber
;
echo $MatDesc
;
echo $Contact
;
echo $ContactNo
;
echo $MatListLoc
;
echo $Driver
;
echo $jobStatus
;
THIS PART WORKS
foreach row to be saved, if there is a :
$database new database;
$sql"UPDATE jobmat.details SET id:id
JobNumber:JobNumber,
jobName:jobName,
jobAddress:jobAddress,
MatDesc:MatDesc,
Contact:Contact,
ContactNo:ContactNo,
MatListLoc:MatListLoc,
Driver:Driver,
jobStatus:jobStatus
where id:id;
$databasequery$sql;
$databasebind:id$id;
$databasebind:JobNumber",$JobNumber;
$databasebind:jobName",$jobName;
$databasebind:jobAddress",$jobAddress;
$databasebind:MatDesc",$MatDesc;
$databasebind:Contact",$Contact;
$databasebind:ContactNo",$ContactNo;
$databasebind:MatListLoc",$MatListLoc;
$databasebind:Driver",$Driver;
$databasebind:jobStatus",$jobStatus;
$databaseexecute;
echo "not correct?Go back to the form
;
echo "Main Page";
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started