Hi every one.
I make it the following code for profile page.but i click edit profile display onle personal description.dont display . <?php if($sf_user->hasFlash("notice_change_password")): ?> this area.
plz tell me how to change.

<?php use_javascript("location") ?>
<?php use_javascript("editProfile") ?>
<?php slot("js") ?>
<script type="text/javascript">
$(document).ready(function(){
    $("#personal_country_id").change();
});
</script>
<?php end_slot() ?>

<div id="personal-edit-profile">
    <?php if($sf_user->hasFlash("notice_edit_profile")): ?>
        <div class="notice"><?php echo $sf_user->getFlash("notice_edit_profile") ?><?php echo $sf_user->setFlash("notice_edit_profile","") ?></div>
    <?php endif?>

    <form id="edit-profile-form" action="<?php echo url_for("@personal_edit_profile?type=detail") ?>" method="post">
    <form action=" content.php" Method="post">
        <h1 class="title">EDIT PROFILE</h1> 
        <div class="field">
            <span class="field-label">*Full Name:</span>
            <input id="personal_full_name" name="personal[full_name]" value="<?php echo $personal["full_name"] ?>" />
            <span id="personal_full_name_error" class="field-error"><?php if (isset($error["full_name"])) echo $error["full_name"] ?></span>
        </div>
        <div class="field">
            <span class="field-label">*Sex:</span>
            <select id="personal_sex" name="personal[sex]">
                <option value="">[Select]</option>
                <?php for ($i = 1; $i <= PersonalTable::SEX_TOTAL; $i++): ?>
                <option value="<?php echo $i ?>" <?php if ($personal["sex"] == $i) echo "selected" ?>><?php echo $sex[$i] ?></option>
                <?php endfor; ?>
            </select>
            <span id="personal_sex_error" class="field-error"><?php if (isset($error["sex"])) echo $error["sex"] ?></span>
        </div>
    <div class="field">
        <span class="field-label">*Birth Date:</span>
        <select id="personal_birth_date_day" name="personal[birth_date_day]">
            <option value="">[DD]</option>
            <?php for ($i = 1; $i <= 31; $i++): ?>
            <option value="<?php echo $i ?>" <?php if ($personal["birth_date_day"] == $i) echo "selected" ?>><?php echo $i ?></option>
            <?php endfor; ?>
        </select>
        /
        <select id="personal_birth_date_month" name="personal[birth_date_month]" class="js-date-select">
            <option value="">[MM]</option>
            <?php for ($i = 1; $i <= 12; $i++): ?>
            <option value="<?php echo $i ?>" <?php if ($personal["birth_date_month"] == $i) echo "selected" ?>><?php echo $i ?></option>
            <?php endfor; ?>
        </select>
        /
        <select id="personal_birth_date_year" name="personal[birth_date_year]" class="js-date-select">
            <option value="">[YYYY]</option>
            <?php for ($i = date("Y"); $i >= 1900; $i--): ?>
            <option value="<?php echo $i ?>" <?php if ($personal["birth_date_year"] == $i) echo "selected" ?>><?php echo $i ?></option>
            <?php endfor; ?>
        </select>
        <span id="personal_birth_date_error" class="field-error"><?php if (isset($error["birth_date"])) echo $error["birth_date"] ?></span>
    </div>
    <div class="field">
        <span class="field-label">*Relationship Status:</span>
        <select id="personal_relationship_status" name="personal[relationship_status]">
            <option value="">[Select]</option>
            <?php for ($i = 1; $i <= PersonalTable::RELATIONSHIP_STATUS_TOTAL; $i++): ?>
            <option value="<?php echo $i ?>" <?php if ($personal["relationship_status"] == $i) echo "selected" ?>><?php echo $relationshipStatus[$i] ?></option>
            <?php endfor; ?>
        </select>
        <span id="personal_relationship_status_error" class="field-error"><?php if (isset($error["relationship_status"])) echo $error["relationship_status"] ?></span>
    </div>
    <div class="field">
        <span class="field-label">*Country:</span>
        <select id="personal_country_id" name="personal[country_id]" class="js-country-select" target="personal_zone_id">
            <option value="">[Select]</option>
            <?php foreach ($countries as $country): ?>
            <option value="<?php echo $country->getId() ?>" <?php if ($personal["country_id"] == $country->getId()) echo "selected" ?>><?php echo $country->getName() ?></option>
            <?php endforeach; ?>
        </select>
        <span id="personal_country_id_error" class="field-error"><?php if (isset($error["country_id"])) echo $error["country_id"] ?></span>
    </div>
    <div class="field">
        <span class="field-label">Zone:</span>
        <select id="personal_zone_id" name="personal[zone_id]">
            <option value="">[Select]</option>
        </select>
        <span id="personal_zone_id_error" class="field-error"><?php if (isset($error["zone_id"])) echo $error["zone_id"] ?></span>
    </div>
    <div class="field"><span class="field-label">Occupation:</span><input id="personal_occupation" name="personal[occupation]" value="<?php echo $personal["occupation"] ?>" /></div>
    <div class="field"><span class="field-label">Education:</span><input id="personal_education" name="personal[education]" value="<?php echo $personal["education"] ?>" /></div>
    <div class="field"><span class="field-label">Hobbies:</span><input id="personal_hobbies" name="personal[hobbies]" value="<?php echo $personal["hobbies"] ?>" /></div>
    <div class="field"><span class="field-label">Professional Interests:</span><input id="personal_professional_interests" name="personal[professional_interests]" value="<?php echo $personal["professional_interests"] ?>" /></div>
    <div class="field">
        <span class="field-label">*About Me:</span>
        <textarea id="personal_about_me" name="personal[about_me]" rows="5" cols="40"><?php echo $personal["about_me"] ?></textarea>
        <span id="personal_about_me_error" class="field-error"><?php if (isset($error["about_me"])) echo $error["about_me"] ?></span>
    </div>
    <h1 class="title">ALIAS</h1> 
    <div class="field">
        <span class="field-label">*Alias:</span>
        <input id="personal_alias" name="personal[alias]" value="<?php echo $personal["alias"] ?>" />
        <span id="personal_alias_error" class="field-error"><?php if (isset($error["alias"])) echo $error["alias"] ?></span>

    <input type="image" alt="[Edit Profile]" />
</form>

</div>
<hr />

<?php if($sf_user->hasFlash("notice_change_password")): ?>
    <div class="notice"><?php echo $sf_user->getFlash("notice_change_password") ?><?php echo $sf_user->setFlash("notice_change_password","") ?></div>
     <?php endif?>        
    <form id="edit-profile-form" action="<?php echo url_for("@personal_edit_profile?type=password") ?>" method="post">
    <h1 class="title">CHANGE PASSWORD</h1> 
    <div class="field"><span class="field-label">Old Password:</span><input type="password" id="personal_old_password" name="personal[old_password]" value="" /></div>
    <div class="field"><span class="field-label">New Password:</span><input type="password" id="personal_new_password" name="personal[new_password]" value="" /></div>
    <div class="field"><span class="field-label">Re-enter New Password:</span><input type="password" id="personal_reenter_new_password" name="personal[reenter_new_password]" value="" /></div>
    <input type="image" alt="[Change Password]" />



</form>


</div>

<input type="hidden" id="url_get_all_zone_by_country_id" value="<?php echo url_for("@get_all_zone_by_country_id"); ?>" />
<input type="hidden" id="zone_id" value="<?php echo $personal["zone_id"] ?>" />
<input type="hidden" id="select_date_id" value="personal_birth_date" />
Member Avatar for diafol

Code tags

Code tags

plz correct my code.
give me solution.

where are the use_javascript() and slot() fuctions definded
or the $sf_user object
looks like your missing an include file (or 2)

Member Avatar for diafol

plz correct my code.
give me solution.

No prob - just highlight your code snippet with the mouse and then press the [ CODE ] button on the editor.

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.