ok for example I have the page where a user can update their profile.
This page has the basic form elements then passes them to another page that has all the code for placing the information into the database.
Ill paste the second pages code below.
<?php
/*
Process Update Profile (update_profile.pro.php)
*/
ob_start();
include "global.inc.php";
$check_username = strtolower(ereg_replace(" ", "", $update_display_name));
if ($check_username == $username)
{
mysql_query("UPDATE members2 SET display_name = '$update_display_name' WHERE username = '$username' AND game = '$game'") or die ("Database error: ".mysql_error());
}
if (($update_mybirthmonth >= 1) AND ($update_mybirthmonth <= 12) AND ($update_mybirthday >= 1) AND ($update_mybirthday <= 31) AND ($update_mybirthyear >= 0) AND ($update_mybirthyear <= $this_year))
{
$birthday = "$update_mybirthmonth-$update_mybirthday-$update_mybirthyear";
mysql_query("UPDATE members_profiles2 SET birthday = '$birthday' WHERE username = '$username' AND game = '$game'") or die ("Database error: ".mysql_error());
}
if (($update_my_gender >= 1) OR ($update_my_gender <= 2))
{
mysql_query("UPDATE members_profiles2 SET gender = '$update_my_gender' WHERE username = '$username' AND game = '$game'") or die ("Database error: ".mysql_error());
}
if (($update_mailsettings >= 0) OR ($update_mailsettings <= 2))
{
mysql_query("UPDATE members_profiles2 SET mail_settings = '$update_mailsettings' WHERE username = '$username'") or die ("Database error: ".mysql_error());
}
if ((!$update_location) OR (!$update_myemail) OR (!$update_myname))
{
die(header(error("update_profile.php?game=$game","BOLD RED fields must not be blank!")));
}
$profile = smilies(badwords(strip_tags($update_myprofile,"<embed><b><u><a><font><img><p><br><body><table><tr><td><background><style><bg><center><bgsound><div><span>")));
$signature = badwords(strip_tags($update_signature,"<b><u><a><font>"));
$update_myemail = badwords(strip_tags($update_myemail,""));
$update_myname = badwords(strip_tags($update_myname,"<b><u>"));
$update_location = badwords(strip_tags($update_location,""));
mysql_query("UPDATE members_profiles2 SET location = '$update_location' WHERE username = '$username' AND game = '$game'");
mysql_query("UPDATE members_profiles2 SET profile = '$profile' WHERE username = '$username' AND game = '$game'");
mysql_query("UPDATE members_profiles2 SET signature = '$signature' WHERE username = '$username' AND game = '$game'");
mysql_query("UPDATE members_profiles2 SET real_name = '$update_myname' WHERE username = '$username' AND game = '$game'");
mysql_query("UPDATE members_profiles2 SET email = '$update_myemail' WHERE username = '$username' AND game = '$game'");
mysql_query("UPDATE members_profiles2 SET avatar = '$avatar_name' WHERE username = '$username'");
die(header(error("update_profile.php?game=$game","Your information has been updated successfully!")));
?>
So where on here does it go?