Hey, as I see it you just have a simple syntax error; you need a few brackets on line 19.
Here is the modified script, try it and let me know if it works now.
<?php
include(DIRNAME(__FILE__) . '/globals.php');
global $ir,$db,$h;
if(isset($_POST['firstname']) || isset($_POST['lastname']))
{
$_POST['firstname'] = nl2br(stripslashes(htmlspecialchars($_POST['firstname'])));
$_POST['lastname'] = nl2br(stripslashes(htmlspecialchars($_POST['lastname'])));
$_POST['realcity'] = nl2br(stripslashes(htmlspecialchars($_POST['realcity'])));
$_POST['country'] = nl2br(stripslashes(htmlspecialchars($_POST['country'])));
$_POST['state'] = nl2br(stripslashes(htmlspecialchars($_POST['state'])));
$_POST['zipcode'] = nl2br(stripslashes(htmlspecialchars($_POST['zipcode'])));
$_POST['status'] = nl2br(stripslashes(htmlspecialchars($_POST['status'])));
$_POST['hometown'] = nl2br(stripslashes(htmlspecialchars($_POST['hometown'])));
$_POST['zodiac'] = nl2br(stripslashes(htmlspecialchars($_POST['zodiac'])));
$_POST['occup'] = nl2br(stripslashes(htmlspecialchars($_POST['occup'])));
$_POST['headline'] = nl2br(stripslashes(htmlspecialchars($_POST['headline'])));
$_POST['header'] = nl2br(stripslashes(htmlspecialchars($_POST['header'])));
$_POST['about_me'] = nl2br(stripslashes(htmlspecialchars($_POST['about_me'])));
$update = sprintf('UPDATE users SET firstname=%s, lastname=%s, age=%u, city=%s, country=%s, state=%s, zipcode=%s, status=%s, hometown=%s, zodiac=%s, orientation=%s, hometown=%s, occupation=%s, headline=%s, header=%s, About_Me=%s, display_pic=%s WHERE (userid = %u)' $_POST['firstname'], $_POST['lastname'], $_POST['realage'], $_POST['realcity'], $_POST['country'], $_POST['state'], $_POST['zipcode'], $_POST['status'], $_POST['hometown'], $_POST['zodiac'], $_POST['Orientation'], $_POST['hometown'], $_POST['occup'], $_POST['headline'], $_POST['header'], $_POST['about_me'], $_POST['newpic'], abs(@int($userid)));
$db->query($update);
}
else{
?>
<form>
<h2>Profile Information</h2><br />
<b>First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
<br />
Age:
<input type="text" name="realage" />
<br />
<input type="radio" name="gender" value="male" /> Male
<br />
<input type="radio" name="gender" value="female" /> Female<br />
<br />
<br />
<h3>Location</h3><br />
City:
<input type="text" name="realcity" />
<br />
Country:
<input type="text" name="country" />
<br />
State:
<input type="text" name="state" />
<br />
Zip Code:
<input type="text" name="zipcode" />
<br />
<br />
<h3>Details:</h3><br />
Marital Status:
<input type="text" name="status" />
<br />
Orientation:
<SELECT name="Orientation">
<OPTION SELECTED>--Choose--
<OPTION>BI
<OPTION>Gay/Lesbian
<OPTION>Straight
<OPTION>Not Sure
<OPTION>No Answer
</SELECT>
<br />
Hometown:
<input type="text" name="hometown" />
<br />
Zodiac Sign:
<input type="text" name="zodiac" />
<br />
Occupation:
<input type="text" name="occup" />
<br />
Headline:
<input type="text" name="headline" />
<br />
<br />
<h3>Change Profile Pictures:</h3><br />
Header:
<input type="text" name="header" />
<br />
Profile Pic:
<input type="text" name="newpic" value="{$ir['display_pic']}" />
<br />
<br />
<h3>About Me:</h3><br />
<form action= method='post'>
<input type='hidden' name='submit' value='1' />
<TEXTAREA NAME="about_me" COLS=40 ROWS=6></TEXTAREA>
<P><INPUT TYPE=SUBMIT VALUE="submit">
</form><br />
<?php}
$h->endpage();
?>