Hi everybody,

i have error in
Notice: Undefined variable: profile_records in C:\wamp\www\user\apps\frontend\modules\main\templates\profileSuccess.php on line 21

plz help me.

index.php
    <div id="frm_edit" class="float-right">

         I'm <?php echo $profile_records['sex']  ?><br />

        <?php if ($profile_records['birthdate'] ): ?> I was born on <?php echo date("F j, Y", strtotime($profile_records['birthdate'])) ?><br /><?php endif ?>
        <?php if ($profile_records['relationshipstatus'] ):?>I'm <?php echo $profile_records[relationshipstatus] ?><br /><?php endif ?>
        <?php if ($profile_records['Occupation'] ): ?>I'm working as a <?php echo $profile_records['occupation'] ?><br /><?php endif ?>
        <?php if ($profile_records['zoneid'] || $personal['countryid']): ?>I'm now residing in <?php if ($profile_records['zoneId']) echo $profile_records['Zone']  ?><?php echo $profile_records['country'] ?><br /><?php endif ?>
        <br />
         <?php if ($profile_records['aboutme']): ?><i>"<?php echo nl2br($profile_records['aboutme']) ?>"</i><br /><br /><?php endif ?>
        <?php if($profile_records['whatido']): ?><i>"<?php echo nl2br($profile_records['whatido']) ?>"</i><?php endif ?>
        <?php if($profile_records['Whatigo']): ?><i>"<?php echo nl2br($profile_records['Whatigo']) ?>"</i><?php endif ?>

    </div>



    action.class.php
    public function executeEdit(sfWebRequest $request)
     {
    $this->_getCurrentUserDetails();
    $this->frm_edit = new PersonalForm();
    $mdl_personal = new Personal();

    if($request->isMethod('post'))
    {
        $profile_record = $request->getParameter('personal');

        if(is_array($profile_record))
            $profile_record['user_id'] = $this->user_id;
        $mdl_personal->insertRecord($profile_record);

    }
     $this->countries = Doctrine::getTable("Country")->findAll();
    //var_dump($mdl_personal);

  }

Thanks .

Where are you getting the $profile_records array information from for the code at the top of the page? I only see it in your code from line 19. Also the code from line 19 has the variable $profile_record and not $profile_records.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.