Guest Posted September 20, 2005 Share Posted September 20, 2005 Hi, ive modified my admin/categories.php file and added some options with radio buttons. ALL work well when i put the update button or i add a new products, all is added correctly to the SQL but i dont know how get the values.. The option added is like this: Available source laguage: 'radio' HTML - 'radio' PHP if HTML is selectionned, this will add 0 the the SQL, and 1 for PHP. How can i return HTML or PHP text in my product_info page? This code just reply test2.. when the value in SQL is set to 0, it return test2 too.. <? if (!isset($pInfo->available_source_html_php)) $pInfo->available_source_html_php = '1'; switch ($pInfo->available_source_html_php) { case '0': echo 'test1'; break; case '1': echo 'test2'; break; default: echo 'test3'; } ?> Link to comment Share on other sites More sharing options...
FalseDawn Posted September 20, 2005 Share Posted September 20, 2005 I would suggest that $pInfo->available_source_html_php is not set. How are you instantiating this value? Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2005 Share Posted September 20, 2005 I would suggest that $pInfo->available_source_html_php is not set. How are you instantiating this value? <{POST_SNAPBACK}> How im what? Link to comment Share on other sites More sharing options...
Guest Posted September 20, 2005 Share Posted September 20, 2005 TOPIC CLOSE! Ty for all ppl who tried to help me. Ive solved my problem! :D I just forgot to put my available_source_html_php there: $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.available_source_psd, p.available_source_html_php, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.