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.

error

Featured Replies

who can find my error

 

this code for update does not work

i think the error in query

i get this message

Notice: Undefined variable: detail in C:\xampp\htdocs\database\mange.php on line 156

///////////////////////////////////////////////////////////////////////////////////////////////
//update
<?
if(isset($pid)){

$uquery= mysql_query("update product SET product_name=`$product_name`,price=`$price`,category=`$category`,detail=`$detail`,picture=`$picture`  WHERE id = `$pid`");
 while($row = mysql_fetch_array($query)){
	 $product_name=$row[1];
	  $price=$row[2];
	   $category=$row[3];
	    $productdetail_name=$row[4];
		 $picture=$row[5];




	 }





?>


<form id="form2" name="form2" method="get" action="mange.php">
<table width="593" border="1" align="right">
 <tr>
   <td width="92">product name</td>
   <td width="369"> <input type="text" name="product_name"value="<? echo $price;?>" id="textfield2"  /></td>
 </tr>
 <tr>
   <td>product price</td>
   <td><input type="text" name="price"value="<? echo $price;?>" id="textfield2" /></td>
 </tr>
 <tr>
   <td>category</td>
   <td><select name ="category">
   <option>"<? echo $detail;?>"</option>
   <option>book</option>
   <option>electorinc </option>
   <option>clothing</option>
   </select>
   </td>
 </tr>
 <tr>
   <td>product datails</td>
   <td><textarea name="detail"rows=5 value="<? echo $detail;?>"></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="update " /></td>
 </tr>
 <tr>
   <td height="128"> </td>
   <td> </td>
 </tr>

</table>

</form>
<? 





}
?>



$[color="#FF0000"][b]uquery[/b][/color]= mysql_query("update product SET .... ");
        while($row = mysql_fetch_array($[color="#FF0000"][b]query[/b][/color])){

 

I'd guess that is causing the problem.

 

On a side note, why on earth are you trying to fetch a MySQL update query? You already have all the variables you get from the query, you just sent them to the DB... :fool:

Edited by Spitfire

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.