当前位置: 首页>>代码示例>>PHP>>正文


PHP Select::makeSelect方法代码示例

本文整理汇总了PHP中Select::makeSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP Select::makeSelect方法的具体用法?PHP Select::makeSelect怎么用?PHP Select::makeSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Select的用法示例。


在下文中一共展示了Select::makeSelect方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

                Enter your email: <input type="text" name="email"> <br />
                Pick your home browser: <?php 
Select::makeSelect('home_browser', $browsers);
?>
 <br />
                Pick your home Operating system: <?php 
Select::makeSelect('home_os', $operatingSystems);
?>
 <br />
                Pick your home ISP's speed: <?php 
Select::makeSelect('home_isp_speed', $speeds);
?>
 <br />
                Pick your work browser: <?php 
Select::makeSelect('work_browser', $browsers);
?>
 <br />
                Pick your work Operating system: <?php 
Select::makeSelect('work_os', $operatingSystems);
?>
 <br />
                Pick your work ISP's speed: <?php 
Select::makeSelect('work_isp_speed', $speeds);
?>
 <br />
                <input type="submit" name="submit" value="Register">
            </form>
        </body>
    </html>

<?php 
开发者ID:nestedminds,项目名称:basic-course-milovan-minic,代码行数:31,代码来源:task014.php

示例2: Select

    $workOS = new Select("work_OS", $os);
    echo "<br/>OS: ";
    $workOS->makeSelect();
    unset($workSpeed, $workBrowser, $workOS);
    ?>
				<h3>Home access</h3>	 
				<?php 
    $homeBrowser = new Select("primary_home_browser", $browsers);
    echo "<br/>Primary browser: ";
    $homeBrowser->makeSelect();
    $homeSpeed = new Select("home_speed", $speeds);
    echo "<br/>Speed: ";
    $homeSpeed->makeSelect();
    $homeOS = new Select("home_OS", $os);
    echo "<br/>OS: ";
    $homeOS->makeSelect();
    unset($homeSpeed, $homeBrowser, $homeOS);
    ?>
<br/>
				<input type="submit" name="submit" value="Go" />
				<br/>* indicates required field
			</form>
		<?php 
} else {
    if (empty($_POST['name']) || empty($_POST['username']) || empty($_POST['email']) || strpos($_POST['email'], '@') === FALSE) {
        if (empty($_POST['name'])) {
            echo "You didn't enter your name =(<br/>";
        }
        if (empty($_POST['username'])) {
            echo "You didn't enter your username =(<br/>";
        }
开发者ID:thejoelpatrol,项目名称:learning-PHP,代码行数:31,代码来源:6-3.php

示例3: isset

  <head>
    <meta charset="utf-8">
    <title>Form Class</title>
  </head>
  <body>
    <form class="" action="task13.php" method="post">
        <input type="text" name="name" value="<?php 
echo isset($_POST['name']) ? $_POST['name'] : '';
?>
">
        <input type="text" name="username" value="<?php 
echo isset($_POST['username']) ? $_POST['username'] : '';
?>
">
        <input type="text" name="email" value="<?php 
echo isset($_POST['email']) ? $_POST['email'] : '';
?>
">
        <?php 
$select = new Select();
$select->setName('browser');
if (isset($browserTypes)) {
    $select->setValue($browserTypes);
    $select->makeSelect();
}
?>
        <input type="submit" name="submit" value="Submit">
    </form>
  </body>
</html>
开发者ID:nestedminds,项目名称:basic-course-rajanam,代码行数:30,代码来源:task13.php

示例4: Select

$selectBrowser = new Select();
$selectBrowser->setName('browser');
echo '<p>Work Access</p>';
if (isset($browserTypes)) {
    $selectBrowser->setValue($browserTypes);
    $selectBrowser->makeSelect();
    unset($selectBrowser);
}
echo '<p>Connection Speed</p>';
$selectSpeed = new Select();
$selectSpeed->setName('speeds');
if (isset($speeds)) {
    $selectSpeed->setValue($speeds);
    $selectSpeed->makeSelect();
    unset($selectSpeed);
}
echo '<p>Operating System</p>';
$selectOs = new Select();
$selectOs->setName('os');
if (isset($os)) {
    $selectOs->setValue($os);
    $selectOs->makeSelect();
    unset($selectOs);
}
?>
          <input type="submit" name="submit" value="Submit">
      </form>
    </div>
  </body>
</html>
开发者ID:nestedminds,项目名称:basic-course-rajanam,代码行数:30,代码来源:task14.php

示例5: Select

				</p>
				<p>
				  Email:
				  <input type="text" name="email" size="60" />
				</p>
				<p>
				  Browser:
				  <?php 
    //Instantiate object
    $browser = new Select();
    //Set properties
    $browser->setName('browser');
    $browser->setValue($browsers);
    //The object has the data it needs from the preceding commands.
    //Tell it to make the select field.
    $browser->makeSelect();
    ?>
				</p>
				<p>
				  <input type="submit" name="submit" value="Go" />
				</p>
			</form>
			<?php 
    //If form submitted, process input.
} else {
    //Retrieve user responses.
    $name = $_POST['name'];
    $username = $_POST['username'];
    $email = $_POST['email'];
    $selBrowser = $_POST['browser'];
    //Confirm responses to user.
开发者ID:bogdanbuciu,项目名称:invendium-practice,代码行数:31,代码来源:php_ex15.php

示例6:

<!DOCTYPE html>
<html>
<head>
    <title>TASK 015</title>
</head>

<body>
<h2>Registration form</h2>
<h5>* Indicates required field</h5>
<form title="registration_form" accept-charset="UTF-8" action="task015_2.php" method="post">
    Enter your name: <input type="text" name="name">* <br />
    Choose your username: <input type="text" name="username">* <br />
    Enter your email: <input type="text" name="email">* <br />
    Pick your home browser: <?php 
$select->makeSelect('home_browser', $browsers);
?>
 <br />
    Pick your home Operating system: <?php 
$select->makeSelect('home_os', $operatingSystems);
?>
 <br />
    Pick your home ISP's speed: <?php 
$select->makeSelect('home_isp_speed', $speeds);
?>
 <br />
    Pick your work browser: <?php 
$select->makeSelect('work_browser', $browsers);
?>
 <br />
    Pick your work Operating system: <?php 
开发者ID:nestedminds,项目名称:basic-course-milovan-minic,代码行数:30,代码来源:task015.php


注:本文中的Select::makeSelect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。