I think that does the opposite of what I'm trying to do. here's the code as I have it now, but it doesn't work. maybe you can tell me why?
//UpdateLocation works perfectly
<?
function UpdateLocation ($url="", $page="") {
global $ibforums, $DB, $sess;
$url = str_replace(",", ",", $url);
$page = str_replace(",", ",", $page);
$newlocation = "ex,".$url.",".$page;
$DB->query ( "UPDATE ibf_sessions SET location='".$newlocation."',
running_time='".time()."' WHERE
id='".$sess->session_id."'
AND member_id='".$ibforums->member['id']."'
LIMIT 1" );
}
//Here's where I am going wrong
if ($submit) {
UpdateLocation ("", $_POST['Loc']);
}
?>
<form method="post">
<input type="text" name="Loc" />
<input type="button" name="submit" value="submit" />
</form>
The text I type in the form is supposed to be placed into UpdateLocation ("", $_POST['Loc']); and then that function should execute. Does this make sense?