Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

helllp

Featured Replies

good morning

 

how i can active edit link

when i click on it dispay all row information by pid virible

and wen cilck on button save the change ..

see my code in attachment

<?
     extract($_GET);

//connect to mysql 
if (!($dbc=mysql_connect("localhost","root","")))
die("could not connect to database ");
//select database
$db_selected = mysql_select_db("ehsan",$dbc);
if(!$db_selected)
{
die("cannt connect ");
}	

$query= mysql_query("select `id`,`product_name`,`price`,`category`,`detail`,`picture`,`date_addd` FROM `product` ");


if(isset($id)) {

$queryid= mysql_query("select id, product_name,price,category,detail,picture,date_addd FROM product WHERE id = '$id'");



$rowid =mysql_fetch_row($queryid);
}
else{

$productlist="no items";
}









?>
<?
extract($_GET);
// delete from DB
if (!($dbc=mysql_connect("localhost","root","")))
die("could not connect to database ");
//select database
$db_selected = mysql_select_db("ehsan",$dbc);
if(!$db_selected)
{
die("cannt connect ");
}	

if(isset($deleteid)){

$dquery=mysql_query("DELETE FROM `product` WHERE `id`='$deleteid'")	;

if(!($result=mysql_query($dquery)))
{
print"the item was deleted seccsessfly ";
 die (mysql_error());


}
}



?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>add items </title>
<style type="text/css">
.title {
color: #0C6;
background-color: #666;
border: thin dotted #000;
position: relative;
text-align: right;
}
</style>
</head>

<body>
<div>

 <p> </p>
 <p> </p>
 <p> </p>
</div>
<div><h1>store list</h1>
 <p>
   <?php
 //get info from title from DB and print it;
while($row =mysql_fetch_row($query))
{


print(" $row[0] $row[1]-   <a href='mange.php?pid=$row[0]'>edit</a>•<a href='mange.php?deleteid=$row[0]'>delete</a><br/>");


	?>
   <?	}




?>
 </p>
</div>

<form id="form1" name="form1" method="post" action="conection.php">
<table width="513" border="1">
 <tr>
   <td width="92">product name</td>
   <td width="405"> <input type="text" name="product_name" id="textfield2"  /></td>
 </tr>
 <tr>
   <td>product price</td>
   <td><input type="text" name="price" id="textfield2" /></td>
 </tr>
 <tr>
   <td>category</td>
   <td><select name ="category">
   <option>book</option>
   <option>electorinc </option>
   <option>clothing</option>
   </select>
   </td>
 </tr>
 <tr>
   <td>product datails</td>
   <td><textarea name="detail"rows=5 ></textarea></td>
 </tr>
 <tr>
   <td>product image </td>
   <td><input type="file" name="picture" /><input type="hidden" name= "upload"  ></td>
 </tr>
 <tr>
   <td></td>
   <td><input type="submit" name="button" value="add this item " /></td>
 </tr>
 <tr>
   <td height="128"> </td>
   <td> </td>
 </tr>

</table>


</form>
</body>
</html>










post-35093-0-74350800-1334894582_thumb.png

  • Author

THANK U FOR REPLY

 

I want to activate the edit link to update info

When I click on the link showing all the information stored in databases in EACH input text

 

then when click on submit button save change in DB

 

I WONT TO MAKE LIKE THIS VIDEO

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.