phpプログラマーを目指せ

関連タイピング
-
ウェブプログラミング言語のタイピング練習ができます。
プレイ回数1.9万長文2819打 -
プログラミングでよく使う記号や構文を練習したい人向け
プレイ回数9890長文956打 -
fputcsv()でファイルを作ってアップロード
プレイ回数845長文257打 -
自分学習用です
プレイ回数592長文382打 -
自分暗記用です
プレイ回数457長文879打 -
自分学習用です
プレイ回数362長文185打 -
自分練習用
プレイ回数434長文259打 -
プレイ回数2241長文732打
問題文
(<?php)
<?php
($res = ””;)
$res = "";
($user= ’root’;)
$USER= 'root';
($pw= ’dai’;)
$PW= 'dai';
($dnsinfo=)
$dnsinfo=
(”mysql:dbname=salesmanagement;host=localhos)
"mysql:dbname=salesmanagement;host=l
(t;charset=utf8”;)
t;charset=utf8";
($pdo = new pdo($dnsinfo,$user,$pw);)
$pdo = new PDO($dnsinfo,$USER,$PW);
(if(isset($_post[’update’])){)
if(isset($_POST['update'])){
(try{)
try{
($sql = ”select * from goods where)
$sql = "SELECT * FROM goods WHERE
(goodsid=?”;)
GoodsID=?";
($stmt = $pdo->prepare($sql);)
$stmt = $pdo->prepare($sql);
($array = array($_post[’id’]);)
$array = array($_POST['id']);
($row = $stmt->fetch(pdo::fetch_assoc);)
$row = $stmt->fetch(PDO::FETCH_ASSOC
($goodsid = $row[’goodsid’];)
$GoodsID = $row['GoodsID'];
($goodsname = $row[’goodsname’];)
$GoodsName = $row['GoodsName'];
($price = $row[’price’];)
$Price = $row['Price'];
(}catch(exception $e){)
}catch(Exception $e){
($res = $e->getmessage();)
$res = $e->getMessage();
(})
}
(})
}
(try{)
try{
($sql = ”select * from goods”;)
$sql = "SELECT * FROM goods";
($stmt = $pdo->prepare($sql);)
$stmt = $pdo->prepare($sql);
($array = null;)
$array = null;
($stmt->execute($array);)
$stmt->execute($array);
($res = ”<table>¥n”;)
$res = "<table>\n";
(while($row =)
while($row =
($stmt->fetch(pdo::fetch_assoc)){)
$stmt->fetch(PDO::FETCH_ASSOC)){
($res .= ”<tr><td>” .$row[’goodsid’])
$res .= "<tr><td>" .$row['GoodsID']
(.”</td><td>” .$row[’goodsname’] .”</td>”;)
."</td><td>" .$row['GoodsName'] ."</
($res .= <<<eof)
$res .= <<<eof
(<td><form method=’post’ action=’’>)
<td><form method='post' action=''>
(<input type=’hidden’ name=’id’)
<input type='hidden' name='id'
(value=’{$row[’goodsid’]}’>)
value='{$row['GoodsID']}'>
(<input type=’submit’ name=’update’ value=’text’>)
<input type='submit' name='update' v
(</form></td>)
</form></td>
(eof;)
eof;
($res .= ”</tr>¥n”;)
$res .= "</tr>\n";
(})
}
($res .= ”</table>¥n”;)
$res .= "</table>\n";
(}catch(exception $e){)
}catch(Exception $e){
($res = $e->getmessage();)
$res = $e->getMessage();
(})
}
(?>)
?>