Hello everybody
i have a problem in call $_post value. I need to upgrade the system. so in list menu already there have name that is 'fields[$threadfield[fieldid]]'
as usual, we call $_POST[region] but in this case the value like fields[$threadfield[fieldid]] cant put in $POST[fields[$threadfield[fieldid]]]
there will bring out the error like below:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected '[', expecting ']' in /home/newgadsc/public_html/includes/adminfunctions_ template.php(39 50) : eval()'d code on line 873
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
my code:
i have a problem in call $_post value. I need to upgrade the system. so in list menu already there have name that is 'fields[$threadfield[fieldid]]'
as usual, we call $_POST[region] but in this case the value like fields[$threadfield[fieldid]] cant put in $POST[fields[$threadfield[fieldid]]]
there will bring out the error like below:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected '[', expecting ']' in /home/newgadsc/public_html/includes/adminfunctions_ template.php(39 50) : eval()'d code on line 873
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
my code:
Code:
<select name="fields[$threadfield[fieldid]]" onchange="setCities(this)" tabindex="1" /> <option value=""/>- Select a State -</option> <option value="Perlis" <if condition="$_POST[fields[$threadfield['fieldid']]] == Perlis">selected</if> />Perlis</option> <option value="Kedah" <if condition="$_POST[fields[$threadfield['fieldid']]] == Kedah">selected</if> />Kedah</option> <option value="Penang" <if condition="$_POST[fields[$threadfield['fieldid']]] == Penang">selected</if> />Penang</option> <option value="Kelantan" <if condition="$_POST[fields[$threadfield['fieldid']]] == Kelantan">selected</if> />Kelantan</option> <option value="Terengganu" <if condition="$_POST[fields[$threadfield['fieldid']]] == Terengganu">selected</if> />Terengganu</option> <option value="Perak" <if condition="$_POST[fields[$threadfield['fieldid']]] == Perak">selected</if> />Perak</option> <option value="Pahang" <if condition="$_POST[fields[$threadfield['fieldid']]] == Pahang">selected</if> />Pahang</option> <option value="Kuala Lumpur" <if condition="$_POST[fields[$threadfield['fieldid']]] == 'Kuala Lumpur'">selected</if> />Kuala Lumpur</option> <option value="Selangor" <if condition="$_POST[fields[$threadfield['fieldid']]] == Selangor">selected</if> />Selangor</option> <option value="Negeri Sembilan" <if condition="$_POST[fields[$threadfield['fieldid']]] == 'Negeri Sembilan'">selected</if> />Negeri Sembilan</option> <option value="Melaka" <if condition="$_POST[fields[$threadfield['fieldid']]] == Melaka">selected</if> />Melaka</option> <option value="Johor" <if condition="$_POST[fields[$threadfield['fieldid']]] == Johor">selected</if> />Johor</option> <option value="Sarawak" <if condition="$_POST[fields[$threadfield['fieldid']]] == Sarawak">selected</if> />Sarawak</option> <option value="Sabah" <if condition="$_POST[fields[$threadfield['fieldid']]] == Sabah">selected</if> />Sabah</option> </select>
Comment