Quantcast
Channel: Recent Discussions - Geek.lk
Viewing all articles
Browse latest Browse all 10205

යාලුවනි මට php වලින් උදව්වක් ඔනේ

$
0
0
යාලුවෙනි මම php වලට ටිකක් අලුත් මට ඩේටා ඩිලිට් කරන්න ටෙබල් එකක් හදා ගන්න ඔනේ ඔන්න පහතින් දැම්මා පොටෝ එක

image
මම මේක හදා ගත්තේ වෙබ් එකක දාලා තිබ්බ ලිපියක් කියවලා නමුත් මේක වැඩ නෑ Notice: Undefined variable: delete in C:\xampp\htdocs\test1.php on line 61 මේ එරර් එක හදා ගන්නේ කොහොමද කියලා කියල දෙන්න පුලුවන් නම් ලොකු උදව්වක්

<?php<br />$host="localhost"; // Host name
$username="root"; // Mysql username
$password="8240"; // Mysql password
$db_name="osclass"; // Database name
$tbl_name="oc_t_item_comment"; // Table name


// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);

$count=mysql_num_rows($result);
?>

 Delete multiple rows in mysql #IdNameLastnameEmail<?php<br />while($rows=mysql_fetch_array($result)){?>"><? echo $rows['pk_i_id']; ?><? echo $rows['s_title']; ?><? echo $rows['s_author_name']; ?><? echo $rows['s_author_email']; ?><?php<br />}?><?php<br />// Check if delete button active, start this // Check if delete button active, start this if($delete){for($i=0;$i<$count;$i++){<br />$del_id = $checkbox[$i];$sql = "DELETE FROM $tbl_name WHERE id='$del_id'";$result = mysql_query($sql);}// if successful redirect to test1.php if($result){echo "";}}mysql_close();?>







යාලුවනි ඔයාලා ගාව තියනවනම් මීට වඩා හොද කෝඩ් එකක් දෙන්නකෝ
කාගේ හරි ලග තියනවාද මේ වගේ ඩේටා ඩිලිට් කරන්න හදපු කෝඩ් එකක්

Viewing all articles
Browse latest Browse all 10205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>