Note that there are some explanatory texts on larger screens.

plurals
  1. POProduct detail not appearing in product page
    primarykey
    data
    text
    <p>When I am adding any product in admin side , all option are updating in product page except product detail</p> <p>Here is the code for addproduct page . Please help me </p> <pre><code>&lt;?php include('includes/init.php'); checkSession(); $subcats=$superadmin-&gt;getAllSubcats(); $cats=$superadmin-&gt;getAllcats(); //$allpkgs=$pkg_class-&gt;getAllPkgs(); ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;title&gt;Admin Ajwa Fruit&lt;/title&gt; &lt;link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" /&gt; &lt;!--[if IE]&gt; &lt;link rel="stylesheet" media="all" type="text/css" href="css/pro_dropline_ie.css" /&gt; &lt;![endif]--&gt; &lt;!-- jquery core --&gt; &lt;script src="js/jquery/jquery-1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="includes/tinymce/tinymce.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; tinymce.init({ selector: "textarea", plugins: "code" }); &lt;/script&gt; &lt;!-- UploadiFy --&gt; &lt;link href="includes/uploadify/uploadify.css" type="text/css" rel="stylesheet" /&gt; &lt;script type="text/javascript" src="includes/uploadify/swfobject.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="includes/uploadify/jquery.uploadify.v2.1.4.min.js"&gt;&lt;/script&gt; &lt;!-- UploadiFy Ends--&gt; &lt;!-- datepicker --&gt; &lt;link rel="stylesheet" href="includes/datepicker/jquery.ui.all.css"&gt; &lt;script src="includes/datepicker/jquery.ui.core.js"&gt;&lt;/script&gt; &lt;script src="includes/datepicker/jquery.ui.widget.js"&gt;&lt;/script&gt; &lt;script src="includes/datepicker/jquery.ui.datepicker.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="includes/datepicker/demos.css"&gt; &lt;!-- datepicker --&gt; &lt;!-- fancybox--&gt; &lt;script type="text/javascript" src="includes/fancybox/jquery.mousewheel-3.0.2.pack.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="includes/fancybox/jquery.fancybox-1.3.1.pack.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="includes/fancybox/jquery.fancybox-1.3.1.css" media="screen" /&gt; &lt;!-- fancybox--&gt; &lt;!-- MUST BE THE LAST SCRIPT IN &lt;HEAD&gt;&lt;/HEAD&gt;&lt;/HEAD&gt; png fix --&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $( "#eventdate" ).datepicker(); jQuery('#logout').mouseover(function(){ jQuery(this).css('cursor','pointer'); }) jQuery('#logout').click(function(){ //ajax $.ajax({ type : "POST", cache : false, url : '&lt;?='logout.php'?&gt;', data : '', success: function(data) { if(data =='1') { window.location = "index.php"; //alert('hi'); } } }); //ajax }) //uploadify $('#mainimage').uploadify({ 'uploader' : 'includes/uploadify/uploadify.swf', 'script' : 'includes/uploadify/mainuploadify.php', 'cancelImg' : 'includes/uploadify/cancel.png', 'folder' : 'images/event_imgs/', 'auto' : false, 'width' : 128, 'height' : 128, 'fileExt' : '*.jpg;*.gif;*.png', 'fileDesc' : 'Image Files', 'buttonImg' : 'images/uploads-icon.png', 'multi' : false, 'onSelect' : function(event,ID,fileObj) { var nooffiles = parseInt($("#mfcounter").val())+1 $("#mfcounter").val( nooffiles) //alert($("#mfcounter").val()); }, 'onCancel' : function(event,ID,fileObj,data) { var nooffiles = parseInt($("#mfcounter").val())-1 $("#mfcounter").val( nooffiles) alert('The queue has been cleared.'); }, 'onComplete' : function(event, ID, fileObj, response, data) { // var responseparts = response.split("|"); $.fancybox.hideActivity(); alert(response); window.location.href="products.php"; } }); //uploadify jQuery('#btn_add').live('click',function(){ $.fancybox.showActivity(); $.ajax ({ type : "POST", cache : false, url : $("#formID").attr('action'), data : $("#formID").serializeArray(), success: function(data) { var response = data.split("|") if(parseInt($("#mfcounter").val())&gt;0) { $('#mainimage').uploadifySettings("scriptData", {'id':response[1]}); $('#mainimage').uploadifyUpload(); // alert(response[1]); } else {alert("Record added successfully."); window.location.href="products.php"; } //location.reload(); } }); }) jQuery('#maincat').live('change',function(){ var val=jQuery('#maincat option:selected').val(); // jQuery('#subcatdiv').html(val); //ajax $.ajax({ type : "POST", cache : false, url : 'getsubcats.php', data : 'id='+val, success: function(data) { jQuery('#subcatdiv').html(data); } }); //ajax }) }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- Start: page-top-outer --&gt; &lt;div id="page-top-outer"&gt; &lt;!-- Start: page-top --&gt; &lt;div id="page-top"&gt; &lt;!-- start logo --&gt; &lt;div style="float:left; padding-top:10px;"&gt; &lt;img src="../images/logo.png" width="219" height="66" /&gt; &lt;/div&gt; &lt;!-- end logo --&gt; &lt;!-- start top-search --&gt; &lt;div id="top-search"&gt;&lt;/div&gt; &lt;!-- end top-search --&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/div&gt; &lt;!-- End: page-top --&gt; &lt;/div&gt; &lt;!-- End: page-top-outer --&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;!-- start nav-outer-repeat................................................................................................. START --&gt; &lt;div class="nav-outer-repeat"&gt; &lt;!-- start nav-outer --&gt; &lt;div class="nav-outer"&gt; &lt;!-- start nav --&gt; &lt;?php include('menu.php'); ?&gt; &lt;!-- start nav --&gt; &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;!-- start nav-outer --&gt; &lt;/div&gt; &lt;!-- start nav-outer-repeat................................................... END --&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;!-- start content-outer ........................................................................................................................START --&gt; &lt;div id="content-outer"&gt; &lt;div id="content"&gt; &lt;!-- start page-heading --&gt; &lt;div id="page-heading"&gt; &lt;h1&gt;Add new Product&lt;/h1&gt; &lt;/div&gt; &lt;!-- end page-heading --&gt; &lt;table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table"&gt; &lt;tr&gt; &lt;th rowspan="3" class="sized"&gt;&lt;img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /&gt;&lt;/th&gt; &lt;th class="topleft"&gt;&lt;/th&gt; &lt;td id="tbl-border-top"&gt;&amp;nbsp;&lt;/td&gt; &lt;th class="topright"&gt;&lt;/th&gt; &lt;th rowspan="3" class="sized"&gt;&lt;img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="tbl-border-left"&gt;&lt;/td&gt; &lt;td&gt;&lt;!-- start content-table-inner ...................................................................... START --&gt; &lt;div id="content-table-inner"&gt; &lt;!-- start table-content --&gt; &lt;div id="table-content"&gt; &lt;!-- start message-yellow --&gt;&lt;!-- end message-yellow --&gt; &lt;!-- start message-red --&gt;&lt;!-- end message-red --&gt; &lt;!-- start message-blue --&gt;&lt;!-- end message-blue --&gt; &lt;!-- start product-table ..................................................................................... --&gt;&lt;!-- end product-table................................... --&gt; &lt;form action="postdata.php" method="post" id="formID"&gt; &lt;input type="hidden" name="mfcounter" value="0" id="mfcounter" /&gt; &lt;table width="500" border="0" cellpadding="1" cellspacing="1"&gt; &lt;tr&gt; &lt;th height="40" align="left"&gt;Product Title:&lt;/th&gt; &lt;td&gt; &lt;input type="text" class="inp-form" name="edata[event_title]" id="etitle" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th height="41" valign="top" align="left"&gt;Product Detail:&lt;/th&gt; &lt;td&gt; &lt;p&gt; &lt;textarea class="" id="edesc" name="pdata" &gt;&lt;/textarea&gt; &lt;/p&gt; &lt;p&gt; &lt;span style="font-size:10px; color:#F00"&gt;Leave blank detail if category for product&lt;/span&gt; &lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th height="45" align="left"&gt;Category:&lt;/th&gt; &lt;td&gt;&lt;select class="styledselect" name="edata[maincategory_id]" id="maincat"&gt; &lt;option value="0"&gt;Select&lt;/option&gt; &lt;?php if(is_array($cats)) {foreach($cats as $eachcats) { echo "&lt;option value='".$eachcats['id']."'&gt;".$eachcats['cat_name']."&lt;/option&gt;"; } } ?&gt; &lt;/select&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th height="45" align="left"&gt;Sub Category:&lt;/th&gt; &lt;td&gt; &lt;div id="subcatdiv"&gt; &lt;select class="styledselect" disabled="disabled" name="edata[category_id]"&gt; &lt;option value="0"&gt;Select&lt;/option&gt; &lt;?php if(is_array($subcats)) {foreach($subcats as $eachcat) { echo "&lt;option value='".$eachcat['id']."'&gt;".$eachcat['title']."&lt;/option&gt;"; } } ?&gt; &lt;/select&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th align="left"&gt;Price:&lt;/th&gt; &lt;td&gt;&lt;!--&lt;input type="text" class="inp-form" name="edata[edate]" id="eventdate" /&gt;--&gt; &lt;input type="text" class="inp-form" name="edata[price]" id="" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th height="57" align="left"&gt;Upload Image:&lt;/th&gt; &lt;td valign="bottom"&gt; &lt;input type="file" name="mainimage" id="mainimage"/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;th&gt;&lt;/th&gt; &lt;td&gt;&lt;input type="button" class="form-submit" id="btn_add" value="Add New User" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt;&lt;/div&gt; &lt;!-- end content-table --&gt; &lt;!-- start paging..................................................... --&gt;&lt;!-- end paging................ --&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/div&gt; &lt;!-- end content-table-inner ............................................END --&gt;&lt;/td&gt; &lt;td id="tbl-border-right"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th class="sized bottomleft"&gt;&lt;/th&gt; &lt;td id="tbl-border-bottom"&gt;&amp;nbsp;&lt;/td&gt; &lt;th class="sized bottomright"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/table&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;!-- end content --&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;!-- end content-outer........................................................END --&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;!-- start footer --&gt; &lt;?php include("footer.php") ?&gt; &lt;!-- end footer --&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I am a beginner please help me in this regard</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload