Vue.component('add-edu', {
        template: `
        <div>
                <div class="gray_dashed"> 
                </div>
                <div class="profileForm_row">
                        <label class="profileForm_label" for="">Education</label>
                                <select class="profile_select" name="education[]">
                                        <option value="" selected readonly<?php if(isset($_POST['education'])) {if($_POST['education'] =='') echo'selected="selected"';}?>>Specify education</option>
                                        <option value="Higher"<?php if(isset($_POST['education'])) {if($_POST['education'] =='Higher') echo'selected="selected"';}?&Gt;>Higher</option>
                                        <option value="Incomplete higher"<?php if(isset($_POST[education]])) {if($_POST[education] ] =='Unfinished Higher') echo'selected="selected"';}?&Gt;>Unfinished Higher</option>
                                        <option value="Average"<?php if(isset($_POST['education'])) {if($_POST['education'] =='Average') echo'selected="selected"';}?&Gt;>Average</option>
                                        <option value="Medium"<?php if(isset($_POST[education]])) {if($_POST[education]] =='Medium Special') echo'selected="selected"';}?&Gt;>Medium Special</option>
                                        <option value="Without education"<?php if(isset($_POST['education'])) {if($_POST['education'] =='Without education') echo'selected="selected"';}?&Gt;>Without education</option>
                                </select>
                </div>
                <div class="profileForm_row">
                        <label class="profileForm_label" for="">City</label>
                        <input class="profileForm_input" placeholder="City" type="text" name="edu_city[]" value="<?php echo @ $data['edu_city'];?>">
                </div>
                <div class="profileForm_row">
                        <label class="profileForm_label" for="">Educational institution</label>
                        <input class="profileForm_input" placeholder="Educational institution" type="text" name="edu_name[]" value="<?php echo @ $data['edu_name'];?>">
                </div>
                <div class="profileForm_row">
                        <label class="profileForm_label" for="">Faculty</label>
                        <input class="profileForm_input" placeholder="Faculty" type="text" name="faculty[]" value="<?php echo @ $data['faculty'];?>">
                </div>
                <div class="profileForm_row">
                        <label class="profileForm_label" for="">Specialty</label>
                        <input class="profileForm_input" placeholder="Specialty" type="text" name="specialty[]" value="<php echo @ $data['specialty'];?>">
                </div>
                <div class="profileForm_row">
                        <label class="profileForm_label" for="">End Date</label>
                        <p><input class="profile_select profile_select__date" name="edu_date[]" type="month" list="monthList" value="<php echo @ $data['edu_date'];?>"></p>
                        <datalist id="monthList">
                        </datalist>
                </div>
        </div>
        `
});


Problem: the component displays, but php data displays as just the text of the code.How to make the php code become working, and not just text

0 Answers 0