I’m a newbie, me gentle on me.
I never had this error until my web hosting company upgraded PHP from
PHP 5.2.x to PHP 5.3.x.
My edit profile page is giving me this following error…
Notice: Undefined index: parse_var in /home/*****/public_html/edit_profile.php on line 152 & line 172
Line 152...
if ($_POST['parse_var'] == "links"){
$website = $_POST['website'];
$website = strip_tags($website);
$website = str_replace("http://", "", $website);
$website = str_replace("'", "'", $website);
$website = str_replace("`", "'", $website);
$website = mysql_real_escape_string($website);
$youtube = preg_replace('#[^A-Za-z_0-9]#i', '', $_POST['youtube']); // filter everything but desired characters
$sqlUpdate = mysql_query("UPDATE myMembers SET website='$website', youtube='$youtube' WHERE id='$id' LIMIT 1");
if ($sqlUpdate){
$success_msg = '<img src="images/round_success.png" width="20" height="20" alt="Success" />Your links and API connections have been updated successfully.';
} else {
$error_msg = '<img src="images/round_error.png" width="20" height="20" alt="Failure" /> ERROR: Problems arose during the information exchange, please try again later.</font>';
}
}
Line 172...
if ($_POST['parse_var'] == "bio"){
$bio_body = $_POST['bio_body'];
$bio_body = str_replace("'", "'", $bio_body);
$bio_body = str_replace("`", "'", $bio_body);
$bio_body = mysql_real_escape_string($bio_body);
$bio_body = nl2br(htmlspecialchars($bio_body));
// Update the database data now here for all fields posted in the form
$sqlUpdate = mysql_query("UPDATE myMembers SET bio_body='$bio_body' WHERE id='$id' LIMIT 1");
if ($sqlUpdate){
$success_msg = '<img src="../root/images/round_success.png" width="20" height="20" alt="Success" />Your description information has been updated successfully.';
} else {
$error_msg = '<img src="../root/images/round_error.png" width="20" height="20" alt="Failure" /> ERROR: Problems arose during the information exchange, please try again later.</font>';
}
}
Thanks in advance,
Scotty13