session_start();
if (session_is_registered($username) && session_is_registered($password)) {
$footer = \"include/links.html\";
if (!$newcat) { # has user-x already filled out the form?
newprod();
include($footer);
} else {
applyadd($newprod,$newcat,$cat_id,$newcatname1,$newcatname2,$newcat_id,$catname);
include($footer);
}
} else {
echo \"Unauthorized. Please <a href=\\"index.php\\">login</a>.</p>\n\";
}
Both user defined functions, newprod() and applyadd() are defined in the same page. newprod() displays a form to fill out. applyadd() takes the information from the newprod()\'s method=POST, has it\'s way with it and inserts it into the mysql database. if you want me to get more specific, I am unable to see what more I can tell you about how I\'m inserting the data into the database... shrug.