Problem with while reading HTML inputs

Hi All,

I am not able to read my HTML form inputs properly in my script.
I have a textarea in my form where user needs to enter sql query... but when user enter query like below :
select * from order_queue where NUM_OF_PICKUP >=3 and TRANSACTION_TYPE=4 ;

its coming like :
select 171_arc abn_daily abn_data_cmpltn abn_rpt abn_voice_cmpltn bvoip_rpt calnet_rpt cola_rpt common_gen_row_data common_rpt data_cmpltn data_ptl_cmplt data_rpt getcanx gov_login_add gvpn_rpt he_recap_cgi iom_db_tool iom_vol ipmis_acc_info_rpt ipmis_rpt le_arc le_cycle le_data le_new_vol le_new_vol_a le_recap_cgi le_rejects le_rpt le_saved le_svc_rpt le_vol local_daily_rpt local_legacy_daily_rpt local_rpt local_svc_rpt lpl_act_co lpl_ft n_nod_rejects networx_authenticate networx_dailyrpt networx_rpt networx_user_rpt nod_25 nod_acty nod_feat_data nod_ft_rpt nod_raw_data nod_recap_cgi nod_vol nod_vol_rpt pq_networx_dailyrpt pq_networx_rpt prime_act_co prime_ft prime_lpl_raw proccgi rejects sv_report swv_geo_acc_code_rpt tnet_networx_dailyrpt tnet_networx_rpt vol_report from order_queue where NUM_OF_PICKUP >=3 and TRANSACTION_TYPE=4 ;

From the above ouput, I found that the symbol "*" is getting replaced with all dir and subdir where my cgi script located....

How to get exact input which user enters in the textarea in my HTML form?

I tried like this in my cgi script :
echo "${FORM_input_query}"

Thanks in advance,
Saravana

Doing "select *" isn't good form anyway. Only select the fields you want to return.

For example:

SELECT fname, lname, ordernum FROM order_queue WJERE NUM_OF_PICKUP >=3 AND TRANSACTION_TYPE=4 ;

If you absolutely must do a select * (and you don't) you can escape the * with a \. "SELECT \* FROM blah blah". But don't.

Please avoid using shell script as CGI script. If you are using languages such as PHP or Perl for cgi, expansion of glob would not occur (automatically) and you should not encounter the same problem.

Is there any way to get the exact value which I enter in the textarea (in my HTML form) in shell script?