Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as PHP by Pouya ( 10 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