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


PHP form::fetch方法代码示例

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


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

示例1: run

 public function run()
 {
     try {
         $form = new form();
         $form->post('new_email')->val('is_email', '', 'Please enter a valid email address');
         $form->post('new_user')->val('minlength', 5, 'Username is too short')->val('maxlength', 15, 'now it\'s too long!');
         $form->post('new_pass')->val('minlength', 7, 'password is too short');
         $to_check = $form->fetch('new_pass');
         $form->post('new_pass_check')->val('confirm', $to_check, 'passwords do not match bruvnaar');
         $form->submit();
         $data = $form->fetch();
         $this->model->createUser($data);
     } catch (Exception $e) {
         session::set('error_message', $e->getMessage());
         header('Location: ../register');
     }
 }
开发者ID:anjuna,项目名称:nipple,代码行数:17,代码来源:register.php

示例2: subVal

 public function subVal()
 {
     try {
         $form = new form();
         $form->post('name')->val('minlength', 2)->val('maxlength', 20)->post('password')->val('minlength', 1)->val('maxlength', 20)->post2('password', 'passwordConfirm')->val('samepass', 'password', 'passwordConfirm');
         $form->mit();
         $data = $form->fetch();
         $this->editSave($_SESSION['userId']);
     } catch (Exception $e) {
         $str = $form->mit2();
         $this->view->ValError = $str;
         $this->edit();
     }
 }
开发者ID:vistazp,项目名称:boatseller,代码行数:14,代码来源:dashboard.php

示例3: emailValidation

 public function emailValidation()
 {
     try {
         $form = new form();
         $form->post('email')->val('minlength', 5)->val('emailExist');
         $form->mit();
         $data = $form->fetch();
         return $data['email'];
         //            print_r($data);
         //            $this->view->render('signup/reset');
     } catch (Exception $e) {
         $str = $form->mit2();
         $this->view->ValError = $str;
         //            $this->view->render('signup/reset');
     }
 }
开发者ID:vistazp,项目名称:boatseller,代码行数:16,代码来源:signup.php

示例4: update

 public function update()
 {
     try {
         $form = new form();
         $form->post('email')->val('minlength', 5)->val('subExist')->post('notify');
         $form->mit();
         $data = $form->fetch();
         $this->model->updateEmail($data);
         $this->view->ValError2 = 'Email options successfully updated!';
         header('location: ' . URL . 'email?email=' . $data['email']);
         //            $this->view->render('email/index');
     } catch (Exception $e) {
         $str = $form->mit2();
         $this->view->ValError = $str;
         $this->view->render('email/index');
     }
 }
开发者ID:vistazp,项目名称:boatseller,代码行数:17,代码来源:email.php

示例5: array

 function addNew_exec()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('comp_name')->val('Individual / Company Name', 'minlength')->post('comp_reg_no')->post('comp_address')->val('Address', 'minlength')->post('comp_postcode')->val('Poscode', 'minlength')->post('comp_state')->val('State', 'minlength')->post('state_other')->val('State', 'minlength')->post('comp_country')->val('Country', 'minlength')->post('comp_phone1')->val('Phone 1', 'minlength')->post('comp_phone2')->post('comp_fax')->post('website')->post('category')->val('Category', 'minlength')->post('tag')->val('Keyword Tag', 'minlength')->post('desc')->val('Description', 'minlength')->post('salutation')->val('Salutation', 'minlength')->post('p_fullname')->val('Fullname', 'minlength')->post('p_pos')->post('p_phone')->post('p_mobile')->val('Mobile No.', 'minlength')->post('p_gender')->val('Gender', 'minlength')->post('comp_email')->val('Email', 'minlength')->post('regdate');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->addNew_exec($data);
         $response_array['r'] = $result['r'];
         $response_array['msg'] = $result['msg'];
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:17,代码来源:supplier.php

示例6: forgotPass

 function forgotPass()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('email')->val('Email', 'email');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->forgotPass_exec($data);
         $response_array['r'] = $result['r'];
         $response_array['msg'] = $result['msg'];
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:17,代码来源:login.php

示例7: run

 public function run()
 {
     try {
         $form = new form();
         $form->post('username')->val('asci_check', '', 'No strange characters mind..');
         $form->post('password');
         if (isset($_POST['remember'])) {
             $form->post('remember');
         }
         $form->submit();
         $data = $form->fetch();
         //print_r($data);die;
         $this->model->link($data);
     } catch (Exception $e) {
         $_SESSION = array();
         $_SESSION['errors'] = $e->getMessage();
         header('Location: ../login');
     }
 }
开发者ID:anjuna,项目名称:nipple,代码行数:19,代码来源:login.php

示例8: exec

 function exec()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('name')->val('Name', 'minlength')->post('email')->val('Email', 'email')->post('phone')->post('message')->val('Message', 'minlength');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->exec($data);
         if ($result['r'] == 'true') {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         } else {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         }
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:22,代码来源:contact.php

示例9: exec

 function exec()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('salutation')->val('Salutation', 'minlength')->post('fullname')->val('Fullname', 'minlength')->post('username')->val('Username', 'minlength')->post('dob')->val('Date Of Birth', 'minlength')->post('email')->val('Email', 'minlength')->post('cemail')->val('Confirm Email', 'minlength')->post('acc_type')->val('Account Type', 'minlength')->post('subscribe')->post('chkusername')->post('dt_join')->post('sponsor_id')->val('Refferal ID', 'minlength');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->join_exec($data);
         if ($result['r'] == 'true') {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         } else {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         }
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:22,代码来源:join.php

示例10: savePayment

 function savePayment()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('agent_id')->post('payment_for')->post('ads_pin')->post('payment_date')->val('Payment Date', 'minlength')->post('payment_time')->val('Payment Time', 'minlength')->post('from_acc')->val('From Account', 'minlength')->post('to_acc')->val('To Account', 'minlength')->post('payment_type')->val('Payment Type', 'minlength')->post('ref')->post('amount')->val('Amount', 'minlength')->val('Amount', 'digit')->post('payment_price')->post('date_submit');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->savePayment($data);
         if ($result['r'] == 'true') {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         } else {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         }
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:22,代码来源:setup.php

示例11: array

 function withdrawal_exec()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('agent_id')->post('bank_name')->val('Bank Name', 'minlength')->post('acc_no')->val('Account No.', 'digit')->post('holder_name')->val('Bank Holder Name', 'minlength')->post('amount')->val('Amount', 'minlength')->post('password')->val('Password', 'minlength')->post('date_request');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->withdrawal_exec($data);
         if ($result['r'] == 'true') {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         } else {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         }
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:22,代码来源:comm.php

示例12: addagent_exec

 public function addagent_exec()
 {
     $response_array = array();
     try {
         $form = new form();
         $form->post('acc_type')->val('Account Type', 'minlength')->post('sponsor_id')->val('Sponsor ID', 'minlength')->post('lv1')->val('Upline ID', 'minlength')->post('salutation')->val('Salutation', 'minlength')->post('fullname')->val('Fullname', 'minlength')->post('ic_no')->val('IC Number', 'digit')->post('dob')->val('Date Of Birth', 'minlength')->post('address')->val('Mailing Address', 'minlength')->post('country')->val('Country', 'minlength')->post('states')->post('gender')->val('Gender', 'minlength')->post('phone')->post('mobile')->val('Mobile', 'minlength')->post('username')->val('Username', 'minlength')->post('chkusername')->post('email')->val('Email', 'minlength')->post('cemail')->val('Confirm Email', 'minlength')->post('lv2')->post('lv3')->post('lv4')->post('lv5')->post('lv6')->post('lv7')->post('lv8')->post('lv9')->post('lv10')->post('dt_join')->post('subscribe');
         $form->submit();
         $data = $form->fetch();
         $result = $this->model->addagent_exec($data);
         if ($result['r'] == 'true') {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         } else {
             $response_array['r'] = $result['r'];
             $response_array['msg'] = $result['msg'];
         }
     } catch (Exception $e) {
         $response_array['r'] = 'false';
         $response_array['msg'] = $e->getMessage();
     }
     echo json_encode($response_array);
 }
开发者ID:kronxblue,项目名称:1stg,代码行数:22,代码来源:mynetwork.php

示例13: form

<?php

require '../libs/form.php';
require '../libs/val.php';
if (isset($_REQUEST['run'])) {
    try {
        $form = new form();
        $form->post('name')->val('minlength', 4)->post('age')->val('digit')->post('gender');
        $form->submit();
        $data = $form->fetch();
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } catch (Exception $ex) {
        echo $ex->getMessage();
    }
}
?>

<form method="POST" action="?run">
    <label>Name :</label><input type="text" name="name" />
    <label>Age :</label><input type="text" name="age" />
    <label>Gender :</label>
    <select name="gender">
        <option value="male">Male</option>
        <option value="female">Female</option>
    </select>
    <input type="submit" value="Submit" />
</form>
开发者ID:kronxblue,项目名称:1stg,代码行数:29,代码来源:form.php


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