选中单选按钮的值获取html表单

时间:2018-05-09 10:22:56

标签: php html mysqli

我有学生学院的两个注册HTML表单。 最初,我有两个学生和学院的单选按钮。如果我选择学生,我将获得学生注册表格,或者如果我选择大学,我将获得大学注册表格,我也想将该单选按钮值插入数据库。我无法理解我应该如何开始。我正在使用PHP和MySQLi技术。请帮帮我吗?

HtmlRow row = FindReport(reportName); // Method which finds row
VerifyStatus(reportName, status); // Method verifies status in the row and returns true if complete
HtmlSpan link = new HtmlSpan(row);

int TimoutMilliSecond = 120000//as you told about 2 minutes for the link to be accessible
int count = 1;
bool ControlExist = false;

while (ControlExist == false)
{
        link.SearchProperties.Add(HtmlSpan.PropertyNames.InnerText, "Order", PropertyExpressionOperator.Contains);

        if (link != null)//null or in your case any bad state you get as result after the SearchProperties on 'link'
        {
            ControlExist = link.Exists;
        }

        if (count > TimoutMilliSecond)
        {
            Assert.Fail("The control 'link' was not found within the timout set out to: " + TimoutMilliSecond.ToString() + " Milliseconds !");
        }
        Playback.Wait(100);
        count = count + 100;
}
if (link != null)
{
    link.Find();
}

1 个答案:

答案 0 :(得分:0)

首先,你需要一个表格。您可以阅读本文以了解如何执行此操作以及如何使用form tutorial

获取表单值

在您需要将这些值放入数据库之后。要做到这一点,我建议你PDO

但您可能应该在尝试this one之前练习一些教程吗?

相关问题