-2
は機能I need this code for my project in school, please help me with this code, i cant quite understand mysqli especially its functions, our professors taught us about mysql, not mysqli so i am in need of help in mysqli if possible you can rewrite it thanks much**致命的なエラー:行に/home/u545753064/public_html/index.phpに未定義関数mysqli_fetch_rows()の呼び出し14
mysqli_fetch_rows()
がないためだ
<?php
include('/home/u545753064/public_html/classes/image_class.php');
$obj_image = new Image();
if(@$_POST['Submit'])
{
$obj_image->image_name=str_replace("'", "''", $_POST['txt_image_name']);
$obj_image->image=str_replace("'", "''", $_POST['txt_image']);
$obj_image->insert_into_image();
$data_image=$obj_image->get_all_image_list();
$row=mysqli_fetch_rows($data_image);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP IMAGE UPLOAD</title>
</head>
<body>
<center><h1>PHP SCHOOL</h1></center>
<center><h1>PHP IMAGE UPLOAD IN DATABASE</h1></center>
<center>
<form method="post" enctype="multipart/form-data">
<table border="1" width="80%">
<tr>
<th width="50%">IMAGE NAME</th>
<td width="50%">
<input type="text" name="txt_image_name">
</td>
</tr>
<tr>
<th width="50%">UPLOAD IMAGE</th>
<td>
<input type="file" name="txt_image">
</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" name="Submit" value="SAVE">
</td>
</tr>
</table>
</form>
</center>
<?php
if($row != 0)
{
?>
<center>
<table width="80" border="1" >
<?php
$icount = 1;
while ($data = mysqli_fetch_assoc($data_image))
{
?>
<tr>
<td style="text-allign:center" style="width:10%"><?php echo $icount; ?>
</td>
<td style="text-allign:center" style="width:10%"><?php echo $data['image_name']; ?>
</td>
<td style="text-allign:center" style="width:10%"><img src="images/<?php echo $data['image']; ?>" style="height:100px;" >
</td>
</tr>
<?php
$icount++;
}
?>
</table>
</center>
<?php
}
?>
</body>
</html>
あなたが最初の接続を選択し、その文句を言わない仕事を設定せずにフェッチしようとすると... – Louis
私はここに私の他のページとそれを接続する<?phpの \t $コン= mysqli_connect(「mysql.hostinger.ph」、 'u545753064_kath'、 'password'、 'u545753064_php'); \t if(mysqli_connect_errno()) \t { \t echo "MySQLに接続できませんでした:"。 mysqli_connect_error(); \t} \t ?> –