Need help displaying php echo in div.
Posted: Wed Oct 20, 2010 11:05 am
Is it possible to display an echo in a div from an if statement before the html code?
Basically I'm using server sockets and need to display the result before and after sending in a div box. You enter the string in an input box which sends to itself it then should display a message in the div saying sending to server, then reads the server message and displays that in the same div box. Is it ok to put post code below in a div in the body?
Basically I'm using server sockets and need to display the result before and after sending in a div box. You enter the string in an input box which sends to itself it then should display a message in the div saying sending to server, then reads the server message and displays that in the same div box. Is it ok to put post code below in a div in the body?
Code: Select all
if(isset($_POST['submit'])) {
echo "sending"
//socket code
echo $serverResult;
}