PLZ Read and reply ASAP HTTP_GET_VARS are working but HTTP_POST_VARS are not.
| From: | Fahd Khan | Date: | Sat, 08 Jun 2002 20:05:57 +0000 |
| Subject: | PLZ Read and reply ASAP HTTP_GET_VARS are working but HTTP_POST_VARS are not. | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-10743@lists.php.net to get a copy of this message | ||
Hi
I have installed red hat 7.3 and have started facing the problem. it has
created a new problem.
When trying to create a category it does not except the name or the
picture I point it to. It does create the category but leaves it blank
without any writing in.
When trying to edit it just has what was previously in the categories
name it has not replaced with new name. Hope this kind a makes sense.
HTTP_GET_VARS are working but HTTP_POST_VARS are not.
Any one facing this problem.
Global variable are on in php.ini.
SERVER["SERVER_SOFTWARE"]
Apache/1.3.23 (Unix) (Red-Hat/Linux) mod_python/2.7.6 Python/1.5.2
mod_ssl/2.8.7 OpenSSL/0.9.6b DAV/1.0.3 PHP/4.1.2 mod_perl/1.26
mod_throttle/3.1.2
Following is the example code.
global $HTTP_GET_VARS, $HTTP_POST_VARS, $current_category_id,
$cPath;
echo $HTTP_POST_VARS['categories_id'];
if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
case 'setflag':
if ( ($HTTP_GET_VARS['flag'] == '0') ||
($HTTP_GET_VARS['flag']
== '1') ) {
if ($HTTP_GET_VARS['tID']) {
tep_set_test_status($HTTP_GET_VARS['tID'],
$HTTP_GET_VARS['flag']);
}
if (USE_CACHE == 'true') {
tep_reset_cache_block('categories');
tep_reset_cache_block('also_purchased');
}
}
tep_redirect(tep_href_link(FILENAME_ADMIN,
'op=test_center&cPath=' . $HTTP_GET_VARS['cPath']));
break;
case 'insert_category':
case 'update_category': -----------------------> here it comes
allright but no ($HTTP_POST_VARS['categories_id']);
$categories_id =
tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
$categories_name =
tep_db_prepare_input($HTTP_POST_VARS['categories_name']);
$sort_order =
tep_db_prepare_input($HTTP_POST_VARS['sort_order']);
if ($HTTP_POST_VARS) echo 'fahd';
echo 'fahd' . $categories_name; exit();
$sql_data_array = array('categories_name' => $categories_name,
'sort_order' => $sort_order);
if ($HTTP_GET_VARS['action'] == 'insert_category') {
$insert_sql_data = array('parent_id' => $current_category_id,
'date_added' => 'now()');
$sql_data_array = tep_array_merge($sql_data_array,
$insert_sql_data);
tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
$categories_id = tep_db_insert_id();
} elseif ($HTTP_GET_VARS['action'] == 'update_category') {
$update_sql_data = array('last_modified' => 'now()');
$sql_data_array = tep_array_merge($sql_data_array,
$update_sql_data);
tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update',
'categories_id = \'' . $categories_id . '\'');
}
if ( ($categories_image != 'none') && ($categories_image != '')
) {
tep_db_query("update " . TABLE_CATEGORIES . " set
categories_image = '" . $categories_image_name . "' where categories_id
= '" . tep_db_input($categories_id) . "'");
$image_location = DIR_FS_CATALOG_IMAGES .
$categories_image_name;
copy($categories_image, $image_location);
}
if (USE_CACHE == 'true') {
tep_reset_cache_block('categories');
tep_reset_cache_block('also_purchased');
}
tep_redirect(tep_href_link(FILENAME_ADMIN,
'op=test_center&cPath=' . $cPath . '&cID=' . $categories_id));
break;
I have checked it on another server and its working. But that server is
RH 7.1.
Warmest Regards,
Fahd Hameed Khan Niazi
Project & Innovative Manager
~Pacific Innotech Pte Ltd~
"Innovative Information Technology & Advertising Solutions Provider"
With us, everyday will be better than yesterday
2 Leng Kee Road, #02-08 Thye Hong Center, Singapore 159088
Tel : 65-4791566 Fax: 65-4794687
Email: fahd@pacw.com; fahd@pakpacw.com
Website: http://www.pacw.com; http://www.pakpacw.com
Confidentiality: Confidential information may be contained in this
message. If you are not the recipient indicated (or responsible for
delivery of the message to such person), you may not take any action
based on it, nor should
you copy or show this to anyone; please reply to this email and
highlight the error to the sender, then delete the message from your
system.
Monitoring of Messages: Please note that we reserve the right to monitor
and
intercept emails sent and received on our network.
Warning: Internet email is not 100% secure. We ask you to understand and
observe this lack of security when emailing us. We do not
acceptresponsibility for changes made to this message after it was sent.
Viruses: Although we have taken steps to ensure that this email and any
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus
free.