电子邮件编辑的Oracle SQL查询的HTML输出

Thank you for anyone who can help me with this!
What i have is an oracle database and i display all open work tickets using while and oci_fetch_row (page pickupready.php).
Each row is displayed in the table and has a checkbox to click on. User clicks multiple checkboxes selecting the rows (work tickets) they need and click Submit button.
New page (sendpickup.php) opens only showing table with rows that were selected by user. Then user has an ability to type quantity for each of the rows and then they click Send Pickup button which should email this output with their entered quantities and pickup times.
My question is how to grab everything that was output on that page + user edited information and email it using php mail() function?
This is my sendpickup.php page:

echo "<form action='' method='post'>";
echo "<table class = 'pickup'>
";
echo "<tr style='background-color: orange'>
";
echo "<th>CXL Date</th><th>Customer</th>";
echo "<th>WO #</th><th>Lot #</th><th>Style</th><th>Color</th><th>Original Qty</th>";
echo "<th>Cut Qty</th><th>Cut Date</th><th>Pickup Qty</th><th>Pickup Time</th>";
echo "</tr>";
echo "<tr style='background-color: #FFFFFF'>
";
echo "<td>".($row[1] !== null ? htmlentities($row[1], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[2] !== null ? htmlentities($row[2], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[3] !== null ? htmlentities($row[3], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[4] !== null ? htmlentities($row[4], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[5] !== null ? htmlentities($row[5], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[6] !== null ? htmlentities($row[6], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[7] !== null ? htmlentities($row[7], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[8] !== null ? htmlentities($row[8], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td>".($row[9] !== null ? htmlentities($row[9], ENT_QUOTES) : "&nbsp;")."</td>
";
echo "<td><input size= '5' style = 'color: red; font-weight: bold' value = $row[8]></td>";
echo "<td><input size= '5' style = 'color: red; font-weight: bold' value = '9 AM'></td>";
echo "</tr>
";
echo "</table>";
echo "<input type='submit' name = 'sendpickup' value='Send Pickup'>";
echo "</form>";

Then i use following to send an email:

if (isset($_POST['sendpickup'])) 
{
$to  = 'wip@abc.com';
$subject = 'READY FOR PICKUP';
$headers  = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
$headers .= 'To: WIP <wip@abc.com>' . "
";
$headers .= 'From: ABC User<wip@abc.com>' . "
";
mail($to, $subject, $message, $headers);
header( 'Location: pickupready.php');
}

Basically my page sendpickup.php works correctly, mail() function works too and my only problem is how to grab data for my $message variable.

i can use grab everything from sql output and assign to this variable but i cannot figure out how to send user information filled out in these 2 input boxes:

echo "<td><input size= '5' style = 'color: red; font-weight: bold' value = $row[8]></td>";
echo "<td><input size= '5' style = 'color: red; font-weight: bold' value = '9 AM'></td>";

so as of right now i do something very basic. I select my output table by dragging mouse over it, then use a copy paste into email and email it manually. It works for time being but i really want to automate this and yet can't figure out how. I apologize if this was asked before - i tried to search but couldn't find any information and i cannot figure it out myself.
thank you again!

dro7152
dro7152 嗨,谢谢你的回复。问题是我使用ob_start()和ob_get_contents()来捕获查询的输出,但这不会捕获任何用户更改。如果我不使用ob_start(),我将如何能够通过用户更改捕获所有输出?
6 年多之前 回复
doushi1900
doushi1900 为您的输入提供一个名称属性,类似于您为提交按钮所做的操作,然后使用$_POST检索值,类似于您使用提交按钮所做的操作,然后将$message设置为已发布输入的值?
6 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问