国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術(shù)文章
文章詳情頁

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

瀏覽:108日期:2024-01-22 17:59:45
利用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為表單處理程序;
標(biāo)簽: PHP
主站蜘蛛池模板: 田阳县| 镇康县| 名山县| 永德县| 车险| 宁河县| 东光县| 扬州市| 甘谷县| 友谊县| 红安县| 淳安县| 海晏县| 顺平县| 桃江县| 陆良县| 合江县| 浑源县| 中阳县| 武宁县| 邯郸市| 卓尼县| 仁寿县| 南岸区| 济源市| 泰安市| 分宜县| 察哈| 老河口市| 兰溪市| 冕宁县| 光泽县| 宁明县| 乐平市| 彭水| 泰来县| 南通市| 保康县| 旺苍县| 宿松县| 德钦县|