<br />
<b>Notice</b>: Undefined variable: linkup in <b>/home/audiodigz/public_html/THERAPIST/edit-linkup.php</b> on line <b>464</b><br />
<br />
<b>Notice</b>: Trying to get property 'details' of non-object in <b>/home/audiodigz/public_html/THERAPIST/edit-linkup.php</b> on line <b>464</b><br />
Line 464: In Bold<!--SSTATUS----------------------------------------------->
<div class="det"
<h3>The following will help the Client decide whether to select you or not. Your photo and you statement will be the only means of helping the Client decide whether its you or another Therapist. Make it good! </h3><br><br>
<!--The avatar is pulled from the tbl_client------------>
<?php
$image_query = mysqli_query($conn,"SELECT therapist_avatar FROM tbl_therapist WHERE therapist_id = {$therapist_id} LIMIT 1");
$therapist = mysqli_fetch_array($image_query);
$img_src = $therapist['therapist_avatar'];
?>
<div class="AVT">
<img src="/AVATAR/images/<?php echo $img_src; ?>" width="230" height="230" id="profileDisplay">
</div>
<br>
<!--DETAILS START-->
<label style="font-weight: bold" for="review">About You</label><br>
<textarea id="review" name="review" rows="6" charswidth="25" cols="43" value=""><?php echo $linkup->details; ?></textarea>
<!--DETAILS START-->
<!--At arise.plus you will have access to caring concerned therapist that will understand you.-->
</div>
<br>
<!--COMPLETE START------------------------------------------>
Information in the tbl_answers_therapist<textarea id="review" name="review" rows="6" charswidth="25" cols="43">
<?php
echo isset($linkup->details)?$linkup->details:' ';
?>
</textarea>
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//var_dump($client_id);
//var_dump($client);
$msg = "";
$msg_class = "";
$conn = mysqli_connect(DB_SERVER,DB_USER,DB_PASS,DB_NAME);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if (isset($_POST['save_profile'])) {
// for the database
//$profileImageName = time() . '-' . $_FILES["profileImage"]["name"];
$profileImageName = $_FILES["profileImage"]["name"];
// For image upload
$target_dir = "../AVATAR/images/";
$target_file = $target_dir . basename($profileImageName);
// VALIDATION
// validate image size. Size is calculated in Bytes
if($_FILES['profileImage']['size'] > 2000) {
$msg_class = "alert-danger";
$msg = "Image size should not be greated than 2MB";
}
// check if file exists
if(file_exists($target_file)) {
$msg_class = "alert-danger";
$msg = "Avatar already exists";
}
// Upload image only if no errors
if (empty($error)) {
if(move_uploaded_file($_FILES["profileImage"]["tmp_name"], $target_file)) {
$sql = "UPDATE tbl_therapist SET therapist_avatar='$profileImageName' WHERE therapist_id = {$therapist_id} LIMIT 1";
if(mysqli_query($conn, $sql)){
$msg_class = "alert-success";
$msg = "Avatar uploaded and saved";
} else {
$msg_class = "alert-danger";
$msg = "There was an error in the database";
}
} else {
$msg = "alert-danger";
$error = "There was an error uploading your avatar";
}
}
}
?>