getpost function update for mysql demo