I'm attempting to store integers in a db field (mylist) separated by a '|'. In the scenerio below I'm trying to fetch an integer from my query string (in this case from $_GET[accept], and tack it onto the end. Must I explode the contents of my 'mylist' field first to get existing integers? and if so how would I do so? Thanks
E.g. of mylist field data - '3|5|3|6|6|'
(that's the format I'd like, but currently I only get so far as to post and integer followed by '|'. example, 6|
<?
if(!empty($a1[mylist]))
{
$numbers = implode("|", $_GET[accept]);
} else {
$numbers = $_GET[accept]."|";
}
$q1 = "update class_members set mylist = '$numbers' where MemberID = '$_SESSION[MemberID]'";
mysql_query($q1) or die(mysql_error());
?>