News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Undefined index: member

Started by edi67, August 11, 2010, 03:02:59 PM

Previous topic - Next topic

edi67

I have one mod removed from here by time but work good in my smf 2.0 rc1 is one mod that add 3 extra filed at user registration, this mod work good but create me a lot of errors such these:

Quote8: Undefined index: member
Line: 200 or 199 or 206

Part of code that make this errors is:

   echo '
                     <tr>
                        <td width="40%">
                           <b>' . $txt['hhyregist1'] . '</b>
                           <div class="smalltext">' . $txt['hhyregist2'] . '</div>
                        </td>
                        <td class="smalltext">
                           <input type="text" name="bday2" size="2" maxlength="2"  tabindex="', @$context['tabindex']++, '"value="', $context['member']['birth_date']['day'], '" /> -
                           <input type="text" name="bday1" size="2" maxlength="2"  tabindex="', @$context['tabindex']++, '"value="', $context['member']['birth_date']['month'], '" /> -
Line:199                           <input type="text" name="bday3" size="4" maxlength="4" tabindex="', @$context['tabindex']++, '" value="', $context['member']['birth_date']['year'], '" />
Line:200                        </td>
                     </tr><tr>

                        <td width="40%"><b>' . $txt['hhyregist3'] . '</b></td>
Line:206                        <td><input type="text" name="location" size="30"  tabindex="', @$context['tabindex']++, '"value="', $context['member']['location'], '" /></td>
                     </tr>
                     <tr>
                        <td width="40%"><b>' . $txt['hhyregist4'] . '</b></td>
                        <td>
                           <select name="gender" size="1" tabindex="', @$context['tabindex']++, '">
                              <option value="0"></option>
                              <option value="1"', (@$context['member']['gender']['name'] == 'm' ? ' selected="selected"' : ''), '>' . $txt['hhyregist5'] . '</option>
                              <option value="2"', (@$context['member']['gender']['name'] == 'f' ? ' selected="selected"' : ''), '>' . $txt['hhyregist6'] . '</option>
                           </select>
                        </td>
                     </tr>';


i think this string $context['member'] made me these errors may be missing some correction in code, somebody can ehlp me ? thx
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Joker™

try changing value code on those lines as

your code

value="', $context['member']['location'], '"


try this

value="', (!empty($context['member']['location']) ? $context['member']['location'] : ''), '"
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

edi67

wow seem to work perfectly i appied that code to others lines and seems okt but i will let you kow after some days

thx very much for now
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Joker™

So, for the time being i'm marking the topic solved , if you find any further issue regarding this mark topic unsolved and post here.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: