phpプログラマーを目指せ
関連タイピング
-
プレイ回数33万1071打
-
プレイ回数649長文記号1049打
-
プレイ回数1466長文英字840打
-
プレイ回数9693長文956打
-
プレイ回数831長文257打
-
プレイ回数359長文185打
-
プレイ回数3188長文795打
-
プレイ回数2602長文536打
問題文
(<?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();
(})
}
(?>)
?>