Knoen Posted September 6, 2008 Posted September 6, 2008 I´ve been trying to get a new form to work, but without luck. in the admin section i´ve created a new button, "More.." so when the user clicks a product he gets "edit, delete, move, copy to" and "More...". The idea is that the "more" form should be handeling other atributes of the product. The trouble is that when i have been typing in all values and the user clicks "update" the fields is not accessible trough the POST variables. This is how the text fields are declared: <form name="kno_insert" action="http://blablabla.com/osc/catalog/admin/categories.php?cPath=27&pID=62&action=kno_insert" method="post" enctype="multipart/form-data"> <table width="600" border="1" align="left" cellpadding="4"> <tr> <td colspan="2" class="pageHeading"> Edit downloadable documents and other data </td> </tr> <tr> <td> Path to downloadable document </td> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="24" height="15"> <input type="file" name="downloadlink"> </td> </tr> <tr> <td> Protectve class </td> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="24" height="15"> <input type="text" name="protectiveClass"> </td> </tr> <tr> <td> Toecap/type </td> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="24" height="15"> <input type="text" name=""> </td> </tr> <tr> <td> Midsole/type </td> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="24" height="15"> <input type="text" name="midsole"> </td> </tr> <tr> <td> Outer sole </td> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="24" height="15"> <input type="text" name="outersole"> </td> </tr> <tr> <td> Other information </td> <td> <img src="images/pixel_trans.gif" border="0" alt="" width="24" height="15"> <input type="text" name="other"> </td> </tr> <tr> <td colspan="2" align="center"> <a href="http://blablabla/osc/catalog/admin/categories.php?cPath=27&pID=62&action=kno_insert"><img src="includes/languages/english/images/buttons/button_update.gif" border="0" alt="Copy" title=" Copy "></a> </td> </tr> </table> When i read the variables i do like this: case 'kno_insert': $toecap = tep_db_prepare_input($HTTP_GET_VARS['toecap']); . . . . . Since it does´t work i must be forgetting something. But what? Can anyone give me an hint? Thanks -Knoen
spooks Posted September 6, 2008 Posted September 6, 2008 1. tep_href_link MUST BE USED FOR ALL LINKS 2. </form> Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al.
Knoen Posted September 6, 2008 Author Posted September 6, 2008 This is how i define the link for the update button: $ref = '<a href="' . tep_href_link(FILENAME_CATEGORIES) . '?cPath='. $cPath .'&pID=' . $HTTP_GET_VARS['pID'] . '&action=kno_insert">'; $btn = tep_image_button('button_update.gif', IMAGE_UPDATE) . '</a>'; $ref . $btn is that correct? The </form> fell out when copying the code. Sorry. It is under the </Table>.
♥FWR Media Posted September 6, 2008 Posted September 6, 2008 Apart from the obvious ommissions of using the all important tep_image tep_href_link functions there is a more glaring error. .. You cannot set a form as method="post" Then collect it as $HTTP_GET_VARS['toecap'] Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.