Parse error in usercp_register.php

Mod that adds a extra field to the users profile, the gender is displayed beside the posts

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Parse error in usercp_register.php

Postby cynikalsam on Sat 26. Feb, 2005 03:01

It has to do with this code

Code: Select all
#
#-----[ FIND ]------------------------------------------------
#
$signature = str_replace(

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Gender MOD
$gender = ( isset($HTTP_POST_VARS['gender']) ) ? intval ($HTTP_POST_VARS['gender']) : 0;
// End add - Gender MOD


I enter it, so that my code looks like this

Code: Select all
   $signature = str_replace(
// Start add - Gender MOD
$gender = ( isset($HTTP_POST_VARS['gender']) ) ? intval ($HTTP_POST_VARS['gender']) : 0;
// End add - Gender MOD
'<br />', "\n", $signature);


And i get a parse error of an unexpected ";" on the line where ($HTTP_POST_VARS['gender']) : 0; is.

I tried temoving the ; but i just get another error. How do i fix it? Everything else is working fine, i have to use the admin panel to change users gender.
cynikalsam
Poster
Poster
 
Posts: 1
Joined: Wed 12. Jan, 2005 14:19

Postby stephen3 on Sat 26. Feb, 2005 10:50

i use easymod install this gender mod and I get error when i choose gender in profile , also is this error..... =.=

Code: Select all
Could not update users table

DEBUG MODE

SQL Error : 1054 Unknown column 'user_gender' in 'field list'

UPDATE phpbb_users SET user_email = 'stephengoi3@hotmail.com', user_icq = '', user_website = 'http://www.mvweb.t-rh.com', user_occ = '', user_from = '', user_from_flag = 'malaysia.gif', user_interests = '', user_sig = '看贴回贴是一种美德,不过别SPAM! S = Stupid P = Pointless A = Annoying M = Messages [img:507bad5513]http://img.photobucket.com/albums/v312/Stephen3/b3658.gif[/img:507bad5513]', user_sig_bbcode_uid = '507bad5513', user_viewemail = 0, user_aim = '', user_yim = '', user_msnm = '', user_attachsig = 1, user_allowsmile = 1, user_allowhtml = 1, user_allowbbcode = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_pm = 1, user_popup_pm = 1, user_timezone = 8, user_dateformat = 'd M Y h:i a', user_lang = 'english', user_style = 1, user_active = 1, user_actkey = '', user_gender = '2' WHERE user_id = 2

Line : 534
File : usercp_register.php


pls help
Last edited by stephen3 on Sun 27. Feb, 2005 05:32, edited 1 time in total.
stephen3
Poster
Poster
 
Posts: 10
Joined: Fri 25. Feb, 2005 00:37

Re: Parse error in usercp_register.php

Postby kooky on Sat 26. Feb, 2005 20:34

cynikalsam wrote:It has to do with this code

Code: Select all
#
#-----[ FIND ]------------------------------------------------
#
$signature = str_replace(

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Gender MOD
$gender = ( isset($HTTP_POST_VARS['gender']) ) ? intval ($HTTP_POST_VARS['gender']) : 0;
// End add - Gender MOD


I enter it, so that my code looks like this

Code: Select all
   $signature = str_replace(
// Start add - Gender MOD
$gender = ( isset($HTTP_POST_VARS['gender']) ) ? intval ($HTTP_POST_VARS['gender']) : 0;
// End add - Gender MOD
'<br />', "\n", $signature);


And i get a parse error of an unexpected ";" on the line where ($HTTP_POST_VARS['gender']) : 0; is.

I tried temoving the ; but i just get another error. How do i fix it? Everything else is working fine, i have to use the admin panel to change users gender.

Be careful

do not add this code in line after
but UNDER THE LINE AFTER :wink:


@ stephen3 -> you didin't run the gender_db_update.php to add SQL queries :)
so run it, it will work
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves


Return to Gender [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron