(学生)就哪些技术(语言、包、库等)征求意见的新手请求以最好的方式解决一个问题。我知道我将不得不花时间学习2-4技术来实现我心目中的解决方案,但我在发布这个问题时至少跳过了技术研究部分。
我想创建一个网页表格,将发送给~500个用户。或者实际上是这个webforms的500个版本/实例,因为每个用户都需要稍微不同。对于每个版本/实例,在服务器/ Google工作表的某个位置的Mongo /Excel/CSV文件中有一个对应的行,其中一列("description")大约有10到30个字。其思想是基于相应的DB行创建表单内容。对于每个表单版本/实例,表单将显示电子表格中"description“列字段中的单词一样多的按钮。表单的用户可以单击这些按钮来突出显示它们,然后可以单击表单的所有段落/实例中常见的"Submit“按钮。输出(即表示用户单击哪个按钮的字符串,例如"000100 001000")将被写入另一列DB/电子表格中的同一行。
我添加了一个带有模拟的图片。那么,您将使用哪些技术来构建这些表单呢?提前感谢您的建议!
发布于 2017-03-21 16:33:25
这里是我们以前使用的一个旧web表单的一部分。这是为本地主机使用xamp或灯。这只是一个未经测试的模板,因为整个文件都很大,但是所有的工作,所以一些实验,这应该是好的。
index.php
<div>
<form action="checkbox-form.php" method="post">
<p> Comments </p> </td>
<input type="texfield" id = "comments" name="comments"> </input>
<input type="checkbox" id="CJL_Freshman" name="formDoor[]" value="CJL_Freshman" /> Create JobLink(CJL) account
<input type ="text" name ="student" /> Enter UserName </input>
<input type="submit" name="formSubmit" value="Submit" /> </input>
</form>
</div>从数据库中获取一个值,将脚本放入索引中,然后使用该值显示所需的内容。
$link = mysqli_connect("localhost", "root", "pass");
mysqli_select_db ($link , "student" );
$result = mysqli_query($link,"SELECT * FROM testTable ");
$row = mysqli_fetch_array($result);
if($row['comments']){
$myvar = $row['comments'];
echo '<script> document.getElementById("comments").value ="' . $myvar . '";</script>';
}checkbox-form.php
<?php
$studentUser = $_POST['student'];
$link = mysqli_connect("localhost", "root", "pass");
//$sql = "CREATE TABLE $student";
mysqli_select_db ($link , "student" );
if ($result = $link->query("SHOW TABLES LIKE '".$studentUser."'")) {
if($result->num_rows == 1) {
echo "Table exists";
}
//create table if doesnt exist
else {
$sql = "CREATE TABLE $studentUser (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
comments varchar(255),
CJL_Freshman TINYINT(1) ) ";
for($i=0; $i < $N; $i++)
{
echo($aDoor[$i] . " ");
if($aDoor[$i])
mysqli_query($link, "UPDATE $studentUser SET $aDoor[$i] = '1' ");
}
mysqli_query($link, "UPDATE $studentUser SET comments = ('$_POST[comments]') ");
mysqli_close($link);
?>https://stackoverflow.com/questions/42932220
复制相似问题