最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

如何在PHP中使用Oracle數(shù)據(jù)庫(4)

 更新時(shí)間:2006年10月09日 00:00:00   作者:  
利用OCI向數(shù)據(jù)表 'email_info' 輸入數(shù)據(jù)

同上,只不過用OCI來寫  

相關(guān)PHP代碼:


if ($submit == "click"){
  // The submit button was clicked!
  // Get the input for fullname and email then store it in the database.
  PutEnv("ORACLE_SID=ORASID");

  $connection = OCILogon ("username","password");
  if ($connection == false){
    echo OCIError($connection)."
";
    exit;
  }

  $query = "insert into email_info values ('$fullname', '$email')";
  $cursor = OCIParse ($connection, $query);
  if ($cursor == false){
    echo OCIError($cursor)."
";
    exit;  
  }

  $result = OCIExecute ($cursor);
  if ($result == false){
    echo OCIError($cursor)."
";
    exit;
  }

  OCICommit ($connection);
  OCILogoff ($connection);
}
else{
  echo '


     <FORM action=insert.php method=post>

    請(qǐng)輸入姓名
    <INPUT name=fullname></INPUT>

    請(qǐng)輸入 Email 地址
    <INPUT name=email></INPUT>

    <INPUT name=submit type=submit value=click></INPUT>         

    </FORM>

     
  ';
}

?>  


對(duì)了,這段腳本必須存為insert.php,因?yàn)樵谡{(diào)用的頁面中指定insert.php為表單處理程序 

相關(guān)文章

最新評(píng)論

扶余县| 扎兰屯市| 海晏县| 疏附县| 固始县| 睢宁县| 武定县| 五河县| 湟中县| 平定县| 阳山县| 玉林市| 北京市| 蚌埠市| 怀集县| 澳门| 永福县| 航空| 长岭县| 嵊泗县| 龙南县| 贡觉县| 巴彦淖尔市| 灵璧县| 浦江县| 新邵县| 苍梧县| 商城县| 湛江市| 元朗区| 瓦房店市| 天等县| 寿光市| 上蔡县| 平阳县| 上饶县| 兰考县| 阜南县| 汾西县| 博白县| 巴里|