Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted as PHP by Pouya ( 12 years ago )
<?PHP
// Parsing Privacy
if($_POST['parse_var'] == "private"){
$private = $_POST['private'];
$private = str_replace("'", "'" ,$private);
$private = str_replace("`", "'" ,$private);
$private = mysql_real_escape_string($private);
$private = nl2br(htmlspecialchars($private));
// update database
$sqlUpdate = mysql_query("UPDATE users SET private='$private' WHERE id='$id' LIMIT 1");
if ($sqlUpdate){
echo 'success';
}else {
echo 'not success';
}
}
?>
<div class="form-group">
<label>Choose how users see your profile</label>
<div class="checkbox">
<label>
<input type="radio" name="private" value="0" <?php echo ($private == '0')? 'checked':'';?> />Anyone
</label>
</br>
<label>
<input type="radio" name="private" value="1" <?php echo ($private == '1')? 'checked':'';?> />Friends Only
</label>
<input name="updateBtn1" type="submit" id="updateBtn1" value="Update" />
<input name="parse_var" type="hidden" value="private"/>
<input name="thisWipit" type="hidden" value="<?php echo $thisRandNum; ?>" />
</div>
</div>
Revise this Paste