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


PHP input_submit函数代码示例

本文整理汇总了PHP中input_submit函数的典型用法代码示例。如果您正苦于以下问题:PHP input_submit函数的具体用法?PHP input_submit怎么用?PHP input_submit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: show_form

function show_form($errors = '')
{
    global $months, $days, $years;
    // If the form is submitted, get defaults from submitted variables
    if ($_POST['_submit_check']) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults: one month from now
        $default_timestamp = strtotime('+1 month');
        $defaults = array('month' => date('n', $default_timestamp), 'day' => date('j', $default_timestamp), 'year' => date('Y', $default_timestamp));
    }
    // If errors were passed in, put them in $error_text (with HTML markup)
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print 'Enter a date and time:';
    input_select('month', $defaults, $months);
    print ' ';
    input_select('day', $defaults, $days);
    print ' ';
    input_select('year', $defaults, $years);
    print '<br/>';
    input_submit('submit', 'Find Tuesdays');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:29,代码来源:answer-9-4.php

示例2: show_form

function show_form($errors = '')
{
    // If the form is submitted, get defaults from submitted parameters
    if (array_key_exists('_submit_check', $_POST)) {
        $defaults = $_POST;
        var_dump($defaults);
    } else {
        // Otherwise, set our own defaults: price is $5
        $defaults = array('price' => '5.00', 'dish_name' => '', 'is_spicy' => 'no');
    }
    // If errors were passed in, put them in $error_text (with HTML markup)
    if (is_array($errors)) {
        $error_text = '<tr><td>You need to correct the following errors:';
        $error_text .= '</td><td><ul><li>';
        $error_text .= implode('</li><li>', $errors);
        $error_text .= '</li></ul></td></tr>';
    } else {
        // No errors? Then $error_text is blank
        $error_text = '';
    }
    // Jump out of PHP mode to make displaying all the HTML tags easier
    ?>
<form method="POST" action="<?php 
    print $_SERVER['PHP_SELF'];
    ?>
">
<table>
<?php 
    print $error_text;
    ?>

<tr><td>Dish Name:</td>
<td><?php 
    input_text('dish_name', $defaults);
    ?>
</td></tr>

<tr><td>Price:</td>
<td><?php 
    input_text('price', $defaults);
    ?>
</td></tr>

<tr><td>Spicy:</td>
<td><?php 
    input_radiocheck('checkbox', 'is_spicy', $defaults, 'yes');
    ?>
 Yes</td></tr>

<tr><td colspan="2" align="center"><?php 
    input_submit('save', 'Order');
    ?>
</td></tr>

</table>
<input type="hidden" name="_submit_check" value="1"/>
</form>
<?php 
}
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:59,代码来源:example-7-30.php

示例3: show_form

function show_form($errors = '')
{
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    if ($errors) {
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print 'Username: ';
    input_text('username', $_POST);
    print '<br/>';
    print 'Password: ';
    input_password('password', $_POST);
    print '<br/>';
    input_submit('submit', 'Log In');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:jmyroup,项目名称:uci_projects,代码行数:18,代码来源:login.php

示例4: show_form

function show_form($errors = '')
{
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    if ($errors) {
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // Since we're not supplying any defaults of our own, it's OK
    // to pass $_POST as the defaults array to input_select and
    // input_text so that any user-entered values are preserved
    print 'Color: ';
    input_select('color', $_POST, $GLOBALS['colors']);
    print '<br/>';
    input_submit('submit', 'Select Color');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:18,代码来源:answer-8-3.php

示例5: show_form

function show_form($errors = '')
{
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print 'Expiration Date: ';
    input_select('month', $_POST, $GLOBALS['months']);
    print ' ';
    input_select('year', $_POST, $GLOBALS['years']);
    print '<br/>';
    input_submit('submit', 'Check Expiration');
    // the hidden _submit_check variable and the end of the form
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:18,代码来源:example-9-13.php

示例6: show_form

function show_form($errors = '')
{
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // the beginning of the form
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    // the file name
    print ' File name: ';
    input_text('filename', $_POST);
    print '<br/>';
    // the submit button
    input_submit('submit', 'Show File');
    // the hidden _submit_check variable
    print '<input type="hidden" name="_submit_check" value="1"/>';
    // the end of the form
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:20,代码来源:answer-10-4.php

示例7: show_form

function show_form($errors = '')
{
    global $hours, $minutes, $months, $days, $years;
    // If the form is submitted, get defaults from submitted variables
    if ($_POST['_submit_check']) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults: the current time and date parts
        $defaults = array('hour' => date('g'), 'ampm' => date('a'), 'month' => date('n'), 'day' => date('j'), 'year' => date('Y'));
        // Because the choices in the minute menu are in five-minute increments,
        // if the current minute isn't a multiple of five, we need to make it
        // into one.
        $this_minute = date('i');
        $minute_mod_five = $this_minute % 5;
        if ($minute_mod_five != 0) {
            $this_minute -= $minute_mod_five;
        }
        $defaults['minute'] = sprintf('%02d', $this_minute);
    }
    // If errors were passed in, put them in $error_text (with HTML markup)
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print 'Enter a date and time:';
    input_select('hour', $defaults, $hours);
    print ':';
    input_select('minute', $defaults, $minutes);
    input_select('ampm', $defaults, array('am' => 'am', 'pm' => 'pm'));
    input_select('month', $defaults, $months);
    print ' ';
    input_select('day', $defaults, $days);
    print ' ';
    input_select('year', $defaults, $years);
    print '<br/>';
    input_submit('submit', 'Find Meeting');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:e15007,项目名称:php2,代码行数:41,代码来源:example-9-16.php

示例8: show_form

function show_form($errors = '')
{
    global $months, $years, $this_year;
    // If the form is submitted, get defaults from submitted variables
    if ($_POST['_submit_check']) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults: the current month and year
        $defaults = array('year' => date('Y'), 'month' => date('n'));
    }
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    input_select('month', $defaults, $months);
    input_select('year', $defaults, $years);
    input_submit('submit', 'Show Calendar');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:22,代码来源:example-9-17.php

示例9: show_form

function show_form($errors = '')
{
    print '<form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '">';
    if ($errors) {
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // Since we're not supplying any defaults of our own, it's OK
    // to pass $_POST as the defaults array to input_select and
    // input_text so that any user-entered values are preserved
    print 'Dish: ';
    input_select('dish', $_POST, $GLOBALS['main_dishes']);
    print '<br/>';
    print 'Quantity: ';
    if (!array_key_exists('quantity', $_POST)) {
        $_POST['quantity'] = '';
    }
    input_text('quantity', $_POST);
    print '<br/>';
    input_submit('submit', 'Order');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:24,代码来源:example-8-10.php

示例10: form_open

<div class="container">
    <?php 
echo form_open(site_url('seguimiento/seguimientos'), ['target' => '_blank', 'class' => 'form-horizontal col-md-8', 'style' => 'margin-left: 15%']);
?>
    <hr style="border: 1px solid #099a5b;"/>
    <?php 
echo select_input(['text' => 'Proyecto', 'collabel' => 3, 'colinput' => 8, 'select' => Dropdown(['name' => 'ID_PROYECTO', 'dataProvider' => $this->proyectos_model->TraeAsesorProyectosDD(), 'placeholder' => '-- Seleccione un proyecto --', 'fields' => ['NOMBRE_PROYECTO']])]);
?>
    <div class="practicantes"></div>
    <div class="momento"></div>
    <?php 
echo br(1);
?>
    <!--Envíar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-4 col-lg-10', 'icon' => 'trash', 'text' => 'Eliminar', 'btn' => 'danger']);
?>

    <?php 
echo call_spin_div();
?>

    <?php 
echo form_close();
?>
</div>
<?php 
echo $this->Footer();
?>

<script>
开发者ID:alexeimun,项目名称:SDCE,代码行数:31,代码来源:EliminarSeguimiento.php

示例11: form_dropdown

    <?php 
echo form_dropdown('ID_MODALIDAD_PRACTICA', ['1' => 'Validación experiencia profesional', 2 => 'Práctica empresarial'], ['label' => ['text' => 'Modalidad']], ['selected' => $Info->ID_MODALIDAD_PRACTICA]);
?>
    <?php 
echo select_input(['select' => $Proyectos, 'text' => 'Proyecto']);
?>
    <?php 
echo select_input(['select' => $Agencias, 'text' => 'Agencia']);
?>
    <div id="flag"><?php 
echo select_input(['select' => $Cooperadores, 'text' => 'Cooperador']);
?>
</div>
    <!--Envíar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10', 'text' => 'Actualizar']);
?>

    <?php 
echo call_spin_div();
?>
    <?php 
echo br(3);
?>
    <?php 
echo form_close();
?>
</div>
<?php 
echo $this->Footer();
?>
开发者ID:alexeimun,项目名称:SDCE,代码行数:31,代码来源:ActualizarPracticante.php

示例12: show_form

function show_form($errors = '')
{
    global $products;
    if ($_SESSION['saved_order']) {
        print 'Your order: <ul>';
        foreach ($products as $product => $description) {
            if (array_key_exists("dish_{$product}", $_SESSION)) {
                print '<li> ' . $_SESSION["dish_{$product}"] . " {$description} </li>";
            }
        }
        print '</ul>';
    } else {
        print 'There is no saved order.';
    }
    print '<br/>';
    // This assumes that the order form page is saved as "orderform.php"
    print '<a href="orderform.php">Return to Order Page</a>';
    print '<br/>';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    input_submit('submit', 'Check Out');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:23,代码来源:answer-8-4.php

示例13: html_head

	default:
		warning(_("Unknown action"));
		redirect();
	}
}


html_head(_("Create new member"));

?>
<section class="help"><p><?php 
echo _("In this demo or test installation you can just create a member account by yourself. Next you will be forwarded to the registration, where you can register yourself with this account.");
?>
</p></section>
<?

form(BN);
echo _("Groups of the new member")?>:<br><?
input_hidden("action", "create");
$sql = "SELECT * FROM ngroup WHERE active=TRUE";
$result = DB::query($sql);
while ( $ngroup = DB::fetch_object($result, "Ngroup") ) {
	input_checkbox("ngroups[]", $ngroup->id, true);
	echo $ngroup->name;
	?><br><?
}
input_submit(_("Create new member"));
form_end();

html_foot();
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:30,代码来源:create_member.php

示例14: input_submit

/**
 * @var $this CI_Loader
 */
$this->Header(['assets' => ['datatables', 'icheck', 'excelexport']]);
?>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 style="text-align: center;color: #099a5b;"><span style="font-size: 25pt;"
                                                                         class="fa fa-table"></span>&nbsp;Cierre Decanatura</h3>
                </div>
                <?php 
echo input_submit(['class' => 'col-lg-offset-5 col-sm-offset-5 col-lg-2', 'icon' => 'export', 'text' => 'Exportar']);
?>

                <div class="box-body">
                    <?php 
echo TablaCierre(['columns' => ['Nombre del estudiante', 'Agencia', 'Tema', 'Registro de asesoría'], 'tableName' => 'practicante', 'id' => 'ID_PRACTICANTE', 'fields' => ['NOMBRE_PRACTICANTE', 'NOMBRE_AGENCIA', 'NOMBRE_PROYECTO', 'CHECKBOX'], 'dataProvider' => $this->practicantes_model->TraePracticantes()]);
?>
                </div>
                <div id="table" style="display: none;">
                    <table id="temp">

                    </table>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
开发者ID:alexeimun,项目名称:SDCE,代码行数:30,代码来源:Decanatura.php

示例15: post_a_note

function post_a_note($id)
{
    $url = INDEX . get_session('contr') . '/addnote?id=' . $id;
    return '' . NL . '<div id="form_note">' . NL . '<h2>Post a note to user</h2>' . NL . '<form action="' . $url . '" method="post">' . NL . input_hidden('id', $id) . NL . textarea('note', null, 88, 2) . NL . input_submit('Add Note', 120) . NL . '</form>' . NL . '</div>';
}
开发者ID:shadobladez,项目名称:erp2,代码行数:5,代码来源:Utility.php


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