• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP inp函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: isinp

function isinp($info = array("prompt" => "this is a prompt", "q" => array(array("bounce", "jump", "hop"), array("walk", "stroll", "ambulate")), "outcome" => array(0 => "fail", 1 => "success A", 2 => "success B")))
{
    $option = 0;
    $failure = $info["outcome"][$option];
    $output = $info["outcome"][$option];
    while ($output == $failure) {
        sleep(2);
        echo $info["prompt"] . "\n";
        $inpstring = inp();
        //retrieve user input and put it in variable
        foreach ($info["q"] as $key => $action) {
            foreach ($action as $word) {
                if (stristr($inpstring, $word)) {
                    sleep(2);
                    //$option = $action + 1;
                    $output = $info["outcome"][$key + 1];
                    // . "\n";
                    break 1;
                }
            }
        }
        if ($output == $failure) {
            sleep(1);
            echo $output . "\n";
        }
    }
    sleep(1);
    echo $output . "\n";
    //print_r($info["q"]);
}
开发者ID:ReqApi,项目名称:phptea,代码行数:30,代码来源:phpnoo.php


示例2: icocss_menu

function icocss_menu($p, $o, $rid)
{
    $ret .= inp('inp', $p) . ' ';
    $ret .= lj('', $rid . '_plug__2_icocss_icocss*j___inp', picto('reload')) . ' ';
    $ret .= lj('', $rid . '_plug__2_icocss_icocss*build', picto('save')) . ' ';
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:7,代码来源:icocss.php


示例3: index

 public function index()
 {
     session_start();
     $id0 = $_SESSION['customerid'];
     $un0 = $_SESSION['username'];
     $pw0 = $_SESSION['password'];
     $t0 = $_SESSION['accesstime'];
     $data['id0'] = $id0;
     $data['un0'] = $un0;
     $data['pw0'] = $pw0;
     $data['t0'] = $t0;
     $nowtime = time();
     // echo $un0;
     // echo $t0;
     if ($nowtime - $t0 > 1440) {
         session_destroy();
         //   echo $nowtime." | ";
         //   $tmp=$nowtime-$t0;
         //   echo $tmp;
         header('Location:' . site_url('Login'));
         exit;
     }
     $this->load->model("login_model");
     $res0 = $this->login_model->validateprofile($un0);
     $tmp = 0;
     foreach ($res0 as $row0) {
         $tmp = $tmp + 1;
     }
     //  if(!($row0 = mysql_fetch_assoc($res0)))
     if ($tmp == 0) {
         //echo 111;
         header('Location:' . site_url('Login'));
         exit;
     }
     function inp($data)
     {
         $data = trim($data);
         $data = stripslashes($data);
         $data = htmlspecialchars($data);
         return $data;
     }
     //get search option
     $this->load->model("search_model");
     $search_res = $this->search_model->getcategory();
     $data['search_res'] = $search_res;
     //get the input
     $productcategoryid = inp($_POST['productcategoryid']);
     $productid = inp($_POST['productid']);
     $this->load->model("search_model");
     $product_res = $this->search_model->getproduct($productcategoryid, $productid);
     $data['product_res'] = $product_res;
     $data['productid_res'] = $productid;
     //the search option
     //save the search option
     //  $searchopt=
     //echo $product_res;
     //output
     $this->load->view('search.php', $data);
 }
开发者ID:BarFox,项目名称:gitDir,代码行数:59,代码来源:Search.php


示例4: model_menu

function model_menu($p, $o, $rid)
{
    $ret = select_j('inp', 'pfunc', '', 'model/model_r', '', '2');
    //$ret.=togbub('plug','model_model*r',btn('popbt','select...'));
    $ret .= inp('inp', $p) . ' ';
    $ret .= lj('', $rid . '_plug__2_model_model*j___inp', picto('reload')) . ' ';
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:8,代码来源:_model.php


示例5: menu

 static function menu($p, $o, $rid)
 {
     $ret = inp('inp', $p) . ' ';
     $ret .= lj('', $rid . '_app__2_model_build___inp', picto('reload')) . ' ';
     //$cols='ib,val,to';//create table, name cols
     //$ret.=lj('','popup_plupin___msqedit_model*1_'.$cols,picto('edit'));
     return $ret;
 }
开发者ID:philum,项目名称:cms,代码行数:8,代码来源:_app.php


示例6: del_com

function del_com($p, $o)
{
    $rid = 'plg' . randid();
    $id = 'del' . $o;
    $ret .= inp('inp' . $o, $p ? $p : $o, atz(44)) . ' ';
    $ret .= lj('popsav', $rid . '_plug___del_delj_' . $o . '__inp' . $o, 'delete') . ' ';
    $ret .= btd($rid, '') . br();
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:9,代码来源:del.php


示例7: index

 public function index()
 {
     function inp($data)
     {
         $data = trim($data);
         $data = stripslashes($data);
         $data = htmlspecialchars($data);
         return $data;
     }
     $this->load->model("search_model");
     $search_res = $this->search_model->getcategory();
     $data['search_res'] = $search_res;
     // echo "here ".$search_res;
     if ($_POST['succeed'] == 'succeed') {
         //php validate ([A-Z][a-z]*( |$))+
         if (preg_match("/[^a-zA-Z0-9\\s]/", inp($_POST['customername']), $par1) || preg_match("/[^a-zA-Z0-9\\s]/", inp($_POST['customeraddress']), $par2) || preg_match("/[^0-9]/", inp($_POST['creditcard']), $par3) || !preg_match("/^\\d\\d\\d\$/", inp($_POST['securitycode']), $par4) || !preg_match("/^(([1-9])|(0[1-9])|(1[0-2]))\\/\\d\\d\$/", inp($_POST['expirationdate']), $par5) || preg_match("/[^a-zA-Z0-9]/", inp($_POST['username']), $par6) || preg_match("/[^a-zA-Z0-9]/", inp($_POST['password0']), $par7)) {
             $errormsg = 'Sign up failed, please check all the input requirements';
             $data['errormsg'] = $errormsg;
             $this->load->view('signup.php', $data);
             //   $this->load->view('postlogin.html');
             return;
         }
         $this->load->model("signup_model");
         $res = $this->signup_model->insertcustomer(inp($_POST['customername']), inp($_POST['customeraddress']), inp($_POST['creditcard']), inp($_POST['securitycode']), inp($_POST['expirationdate']), inp($_POST['username']), inp($_POST['password0']));
         //
         //   echo gothere;
         $this->load->model("signup_model");
         $res7 = $this->signup_model->getlastid();
         $row7 = mysql_fetch_assoc($res7);
         $lastid = $row7['LAST_INSERT_ID()'];
         //  echo $lastid;
         //   echo $lastid;
         //build session
         $_SESSION['username'] = inp($_POST['username']);
         $_SESSION['password'] = inp($_POST['password0']);
         //when to destroy? need a log out? how to set the timeout?
         $_SESSION['customerid'] = $lastid;
         $_SESSION['accesstime'] = time();
         //echo $_SESSION['username'];
         //echo $_SESSION['password'];
         //echo $_SESSION['customerid'];
         //echo $_SESSION['accesstime'];
         //add some php validate
         //   header("Location: search.php");
         //jump to that page
         //  $this->load->view('search.php',$data);
         header('Location:' . site_url('Search'));
     } else {
         //    $row2 = mysql_fetch_assoc($search_res);
         //   echo "got ".$row2['productcategoryid'];
         $this->load->view('signup.php', $data);
     }
     //	$this->load->view('welcome_message');
 }
开发者ID:BarFox,项目名称:gitDir,代码行数:54,代码来源:Signup.php


示例8: menu

 static function menu($p, $o, $rid)
 {
     $ret = inp('inp', $p ? $p : 1) . ' ';
     $ret .= lj('', $rid . '_app___slides_j__' . $rid . '_inp', picto('reload')) . ' ';
     if (auth(6)) {
         $ret .= lj('', 'popup_plupin___msqedit_slides*' . $p . '_val', picto('edit')) . ' ';
         $j = 'popup_msqledit___users_' . ajx(ses('nodslid')) . '_';
         $ret .= lj('', $j . $p . '_1', picto('editxt')) . ' ';
         $ret .= lj('', 'popup_plup___msqedit_msqdt*add_slides*' . $p . '_val', picto('add')) . ' ';
     }
     return divc('', $ret);
 }
开发者ID:philum,项目名称:cms,代码行数:12,代码来源:slides.php


示例9: plug_umglyphes

function plug_umglyphes($p, $o)
{
    if ($o == '1') {
        return ug_build($p);
    }
    $ret .= lj('', 'umglph___4', picto('del')) . ' ';
    $ret .= inp('umglph', $p, atz('44')) . ' ';
    $ret .= lj('popsav', 'umgl_plug___umglyphes_ug*build_' . ajx($p) . '__umglph', 'ok') . ' ';
    $ret .= divd('umgl', ug_build($p)) . br();
    $ret .= msqlink('', 'ummo_umvoc_1', '') . ' ';
    $ret .= lkt('', '/plug/umvoc', picto('link'));
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:13,代码来源:umglyphes.php


示例10: index

 public function index()
 {
     session_start();
     $id0 = $_SESSION['customerid'];
     $un0 = $_SESSION['username'];
     $pw0 = $_SESSION['password'];
     $t0 = $_SESSION['accesstime'];
     $data['id'] = $id0;
     $data['un'] = $un0;
     $data['pw'] = $pw0;
     $data['t0'] = $t0;
     $nowtime = time();
     if ($nowtime - $t0 > 1440) {
         session_destroy();
         header('Location:' . site_url('Login'));
         exit;
     }
     $this->load->model("login_model");
     $res0 = $this->login_model->validateprofile($un0);
     if (!($row0 = mysql_fetch_assoc($res0))) {
         // echo lll;
         header('Location:' . site_url('Login'));
         exit;
     }
     function inp($data)
     {
         $data = trim($data);
         $data = stripslashes($data);
         $data = htmlspecialchars($data);
         return $data;
     }
     $errormsg = "";
     if ($_POST['succeed'] == 'succeed') {
         $this->load->model("accountinfo_model");
         $res0 = $this->accountinfo_model->updatecustomer(inp($_POST['username']), inp($_POST['password0']), inp($_POST['customername']), inp($_POST['customeraddress']), inp($_POST['creditcard']), inp($_POST['securitycode']), inp($_POST['expirationdate']), $id0);
         $errormsg = "Your infomation has been successfully saved.";
     }
     $data['errormsg'] = $errormsg;
     $this->load->model("accountinfo_model");
     $res3 = $this->accountinfo_model->showcustomer($id0);
     $data['res3'] = $res3;
     //get search option
     $this->load->model("search_model");
     $search_res = $this->search_model->getcategory();
     $data['search_res'] = $search_res;
     //output
     $this->load->view('accountinfo.php', $data);
 }
开发者ID:BarFox,项目名称:gitDir,代码行数:48,代码来源:Accountinfo.php


示例11: f

function f($idcolumn, $arrayOFchisla, $n, $loe, $key)
{
    //надо переделать
    $poscenter = Math . round($n / 2) + 1;
    $a = inp($idcolumn, $arrayOFchisla, $n);
    $inparr = $a[1];
    $b = xor2($key[3], $inparr[0], $loe);
    $b = for2(1, $poscenter, $b, $inparr, $loe);
    //
    $b = xor2($key[2], $b, $loe);
    $b = for2($poscenter + 1, $a[0] - 3, $b, $inparr, $loe);
    //
    $b = xor2($key[1], $b, $loe);
    $b = xor2($inparr[$a[0] - 2], $b, $loe);
    $b = xor2($inparr[$a[0] - 1], $b, $loe);
    return $b;
}
开发者ID:lexasub,项目名称:shifrWithPHP,代码行数:17,代码来源:shifrovanie.php


示例12: index

 public function index()
 {
     function inp($data)
     {
         $data = trim($data);
         $data = stripslashes($data);
         $data = htmlspecialchars($data);
         return $data;
     }
     $this->load->model("search_model");
     $search_res = $this->search_model->getcategory();
     $data['search_res'] = $search_res;
     // echo "here ".$search_res;
     if ($_POST['succeed'] == 'succeed') {
         $this->load->model("signup_model");
         $res = $this->signup_model->insertcustomer(inp($_POST['customername']), inp($_POST['customeraddress']), inp($_POST['creditcard']), inp($_POST['securitycode']), inp($_POST['expirationdate']), inp($_POST['username']), inp($_POST['password0']));
         //
         $this->load->model("signup_model");
         $res7 = $this->signup_model->getlastid();
         $row7 = mysql_fetch_assoc($res7);
         $lastid = $row7['LAST_INSERT_ID()'];
         //   echo $lastid;
         //build session
         $_SESSION['username'] = inp($_POST['username']);
         $_SESSION['password'] = inp($_POST['password0']);
         //when to destroy? need a log out? how to set the timeout?
         $_SESSION['customerid'] = $lastid;
         $_SESSION['accesstime'] = time();
         //echo $_SESSION['username'];
         //echo $_SESSION['password'];
         //echo $_SESSION['customerid'];
         //echo $_SESSION['accesstime'];
         //add some php validate
         //   header("Location: search.php");
         //jump to that page
         //  $this->load->view('search.php',$data);
         header('Location:' . site_url('Search'));
     } else {
         //    $row2 = mysql_fetch_assoc($search_res);
         //   echo "got ".$row2['productcategoryid'];
         $this->load->view('signup.php', $data);
     }
     //	$this->load->view('welcome_message');
 }
开发者ID:BarFox,项目名称:gitDir,代码行数:44,代码来源:Signup.php


示例13: stripslashes

    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
//usertype
if ($ut != 'manager') {
    //require 'login.php';
    //  die;//?
    header("Location: login.php");
    //  echo $ut." ".$un;
    exit;
}
// echo $ut;
$lowlimit = inp($_POST['lowlimit']);
$highlimit = inp($_POST['highlimit']);
$usertype = inp($_POST['usertype']);
echo "asd " . $usertype . " dasd";
//delete is handled in the same page
if (strlen($lowlimit) == 0) {
    $lowlimit = 0;
}
if (strlen($highlimit) == 0) {
    $highlimit = 99999999;
    //this is not a good way
}
if ($usertype == 'undefined') {
    $usertype = "%";
}
$sql = "select * from users, employees where  users.userindex = employees.userindex and employees.salary < " . $highlimit . " and employees.salary > " . $lowlimit . " and users.usertype like '" . $usertype . "'";
echo "seccessful: " . $sql;
?>
开发者ID:BarFox,项目名称:gitDir,代码行数:31,代码来源:showElist.php


示例14: htmlspecialchars

    $data = htmlspecialchars($data);
    return $data;
}
//usertype
if ($ut != 'manager') {
    //require 'login.php';
    //  die;//?
    header("Location: login.php");
    //  echo $ut." ".$un;
    exit;
}
// echo $ut;
$lowlimit = inp($_POST['lowlimit']);
$highlimit = inp($_POST['highlimit']);
$productid = inp($_POST['productname']);
$category = inp($_POST['category']);
echo "asd " . $category . " dasd";
//delete is handled in the same page
if (strlen($lowlimit) == 0) {
    $lowlimit = 0;
}
if ($productid == 'undefined') {
    $productid = "%";
}
if (strlen($highlimit) == 0) {
    $highlimit = 99999999;
    //this is not a good way
}
if ($category == 'undefined') {
    $category = "%";
}
开发者ID:BarFox,项目名称:gitDir,代码行数:31,代码来源:showPlist.php


示例15: trim

    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
if ($_POST['succeed'] == 'succeed') {
    $sql = "insert into customer (customername,customeraddress,creditcard,securitycode,expirationdate,username,password) values ('" . inp($_POST['customername']) . "','" . inp($_POST['customeraddress']) . "','" . inp($_POST['creditcard']) . "','" . inp($_POST['securitycode']) . "','" . inp($_POST['expirationdate']) . "','" . inp($_POST['username']) . "',password('" . inp($_POST['password0']) . "'))";
    $res = mysql_query($sql, $con);
    //
    $sql7 = "SELECT LAST_INSERT_ID()";
    $res7 = mysql_query($sql7, $con);
    $row7 = mysql_fetch_assoc($res7);
    $lastid = $row7['LAST_INSERT_ID()'];
    //build session
    $_SESSION['username'] = inp($_POST['username']);
    $_SESSION['password'] = inp($_POST['password0']);
    //when to destroy? need a log out? how to set the timeout?
    $_SESSION['customerid'] = $lastid;
    $_SESSION['accesstime'] = time();
    //add some php validate
    header("Location: search.php");
    exit;
}
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>CS571 Assignment 3</title>
        <link rel="stylesheet" type="text/css" href="style.css" />
        <script type="text/javascript" src="jsfile.js"></script>
    </head>
开发者ID:BarFox,项目名称:gitDir,代码行数:31,代码来源:signup.php


示例16: mysql_query

                                <?php 
$sql2 = "select * from productcategory";
$res2 = mysql_query($sql2, $con);
while ($row2 = mysql_fetch_assoc($res2)) {
    echo '<option value="';
    echo $row2['productcategoryid'] . '">';
    echo $row2['productcategoryname'] . '</option>';
}
?>
                            </select>
                        </div>

                        <div style="width: auto; height: auto; float: left; display: inline">

<input class="input" id="productid" name="productid" type="text" size="40px" value=<?php 
echo "'" . inp($_POST['productid']) . "'";
?>
 style="border:1px; height:30px;  font-size:20px"/>

                        </div>

                        <div style="width: auto; height: auto; float: left; display: inline">
                            <button id="searchbutton" class="searchbutton" style="width: 100px; height: 30px;border-radius:3px;"  >Search</button>
                        </div>
                    </form>
                </div>
            </div>
            <div style="display:inline-block;height:40px;width:auto;float:right;padding:5px;position:relative;top:35px;">
                <FORM METHOD=POST ACTION="search.php">
                    <input type="hidden" name="operation" value="logout">
                    <button class="rightbutton">Logout</button>
开发者ID:BarFox,项目名称:gitDir,代码行数:31,代码来源:search.php


示例17: index

 public function index()
 {
     session_start();
     $id = $_SESSION['customerid'];
     $un = $_SESSION['username'];
     $pw = $_SESSION['password'];
     $t0 = $_SESSION['accesstime'];
     $data['id'] = $id;
     $data['un'] = $un;
     $data['pw'] = $pw;
     $data['t0'] = $t0;
     $nowtime = time();
     if ($nowtime - $t0 > 1440) {
         session_destroy();
         header('Location:' . site_url('Login'));
         exit;
     }
     $this->load->model("login_model");
     $res0 = $this->login_model->validateprofile($un);
     if (!($row0 = mysql_fetch_assoc($res0))) {
         // echo lll;
         header('Location:' . site_url('Login'));
         exit;
     }
     function inp($data)
     {
         $data = trim($data);
         $data = stripslashes($data);
         $data = htmlspecialchars($data);
         return $data;
     }
     //get search option
     $productid = $this->uri->segment(3);
     $this->load->model("search_model");
     $search_res = $this->search_model->getcategory();
     $data['search_res'] = $search_res;
     //handle checkout
     if ($_POST['succeed'] == 'succeed') {
         //update customer!! insert into orderitems &orderhis, delete from orders!!!!!
         $this->load->model("ordersucc_model");
         $res4 = $this->ordersucc_model->updatecustomer(inp($_POST['username']), inp($_POST['customername']), inp($_POST['customeraddress']), inp($_POST['creditcard']), inp($_POST['securitycode']), inp($_POST['expirationdate']), inp($id));
         //insert into orderhis
         date_default_timezone_set("UTC");
         $nowtime = date("Y-m-d h:i:sa");
         $this->load->model("ordersucc_model");
         $res6 = $this->ordersucc_model->insertorderhis($nowtime, inp($_POST['customeraddress']), inp($_POST['creditcard']), inp($id));
         //get orderid
         $this->load->model("ordersucc_model");
         $res7 = $this->ordersucc_model->getlastid();
         $row7 = mysql_fetch_assoc($res7);
         $lastid = $row7['LAST_INSERT_ID()'];
         //echo $row7['LAST_INSERT_ID()'];
         //echo $id;
         //get all orders need to be placed
         $this->load->model("ordersucc_model");
         $res8 = $this->ordersucc_model->getorders($id);
         while ($row8 = mysql_fetch_assoc($res8)) {
             //$row8['productid'] $row8['quantity']
             //need to handle for specialsales
             $this->load->model("ordersucc_model");
             $res9 = $this->ordersucc_model->getproduct($row8['productid']);
             $row9 = mysql_fetch_assoc($res9);
             //specialsales
             $this->load->model("ordersucc_model");
             $res18 = $this->ordersucc_model->getspecialsales($row8['productid']);
             if ($row18 = mysql_fetch_assoc($res18)) {
                 date_default_timezone_set("UTC");
                 // $nowtime=date("Y-m-d");
                 $nowyear = date("Y");
                 $nowmonth = date("m");
                 $nowday = date("d");
                 $nowstr = $nowyear . $nowmonth . $nowday;
                 //echo $nowstr;
                 $startstr = substr($row18['startdate'], 0, 4) . substr($row18['startdate'], 5, 2) . substr($row18['startdate'], 8, 2);
                 $endstr = substr($row18['enddate'], 0, 4) . substr($row18['enddate'], 5, 2) . substr($row18['enddate'], 8, 2);
                 if ($startstr <= $nowstr && $endstr >= $nowstr) {
                     //echo specialsales
                     $value4 = 0.7 * $row9['productprice'];
                 } else {
                     //if date not OK just normal price
                     $value4 = $row9['productprice'];
                 }
             } else {
                 //no special sale exist, just normal price
                 $value4 = $row9['productprice'];
             }
             $this->load->model("ordersucc_model");
             $res10 = $this->ordersucc_model->insertitems($lastid, $row8['productid'], $row8['quantity'], $value4);
         }
         $this->load->model("ordersucc_model");
         $res11 = $this->ordersucc_model->deleteorders($id);
         //   $sql11="delete from orders where customerid='".$id."'";
         //  $res11=mysql_query($sql11);
         //add some php validate
         // header("Location: search.php");
         // exit;
     }
     //output
     $this->load->view('ordersucc.php', $data);
 }
开发者ID:BarFox,项目名称:gitDir,代码行数:100,代码来源:Ordersucc.php


示例18: mysql_select_db

            //
        }
        mysql_select_db('assignment2', $con2);
        $res2 = mysql_query($sql2, $con2);
        header("Location: employeepage.php");
        exit;
        //  }
        // echo "here is the productid: ".$_POST['product'];
    }
}
//set the default value of change
if ($_POST['operation'] == "change") {
    $value1 = "";
    $value2 = "";
    $value3 = "";
    $sql = "select * from specialsales where specialsalesid='" . inp($_POST['product']) . "'";
    $con = mysql_connect(':/home/scf-27/chentian/mysql.sock', 'root', '1992');
    //when to close?????
    if (!$con) {
        die;
        //
    }
    mysql_select_db('assignment2', $con);
    $res = mysql_query($sql, $con);
    if ($row = mysql_fetch_assoc($res)) {
        date_default_timezone_set("UTC");
        $value1 = $row['productid'];
        // $sql10="SELECT FROM_UNIXTIME(".$row['startdate'].", '%Y-%m-%d')";
        // $res10=mysql_query($sql10,$con);
        // $row10 = mysql_fetch_assoc($res10);
        $value2 = date('Y-m-d', $row['startdate']);
开发者ID:BarFox,项目名称:gitDir,代码行数:31,代码来源:addchangeS.php


示例19: mysql_select_db

        }
        mysql_select_db('assignment3', $con2);
        $res2 = mysql_query($sql2, $con2);
        header("Location: employeepage.php");
        exit;
        //  }
        // echo "here is the productid: ".$_POST['product'];
    }
}
//set the default value of change
if ($_POST['operation'] == "change") {
    $value1 = "";
    $value2 = "";
    $value3 = "";
    $value4 = "";
    $sql = "select * from product where productid='" . inp($_POST['product']) . "'";
    $con = mysql_connect(':/home/scf-27/chentian/mysql.sock', 'root', '1992');
    //when to close?????
    if (!$con) {
        die;
        //
    }
    mysql_select_db('assignment3', $con);
    $res = mysql_query($sql, $con);
    if ($row = mysql_fetch_assoc($res)) {
        $value1 = $row['productcategoryid'];
        $value2 = $row['productname'];
        $value3 = $row['productdesc'];
        $value4 = $row['productprice'];
    }
}
开发者ID:BarFox,项目名称:gitDir,代码行数:31,代码来源:addchangeP.php


示例20: fav_com_form

function fav_com_form($p, $o)
{
    return txarea('comv', $p, 44, 4, atb('placeholder', 'Api Command') . atz('44')) . br() . inp('comn', $o, atb('placeholder', 'name'));
}
开发者ID:philum,项目名称:cms,代码行数:4,代码来源:favs.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP input函数代码示例发布时间:2022-05-15
下一篇:
PHP inotify_read函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap