Meta Refresh on submit button

Hi,
Please help on Meta refresh.

Example:
I have 2 page. page A and page B.

how can i refresh page B if i’am on page A using a submit button.and vise versa.

Thanks.

Where are those two pages running in? Two different browsers? Or in the same browser but in a different pop up window? If you mean to submit a form from A to B then simply put b.php in form’s action attribute.

<form method="post" action="">
<input type="submit" name="Submit" value="Submit"/>
</form>
if (isset ($_POST['Submit'])) { // Check if form has been submitted
print "<meta http-equiv='refresh' content='=2; /* page here */'/>";
}

And you can swap pages

Or you could just put whichever page u want opened in the action part of your form

<form method="post" action="page here">
<input type="submit" name="Submit" value="Submit"/>
</form>

same browser…

i am making a simple chatbox,this is a 1-1 chatbox only…can you guys help me how can i accomplish the task that after sending the message,the message will receive instantly on the other end using a submit button.
thanks.

The chat system in PHP can be done with simple AJAX implementation. Please see the results in Google:
php ajax chat - Google

That is not what i meant…i have my own php script for the chat…i just want to know is meta refresh can accomplish this task…