...

View Full Version : Problem with popup message



manjunath1985
10-31-2007, 11:24 AM
I have a php page called sms.php which displays checkbox value retrieved from the previous page.
Here is the code:
<?
foreach($_POST['check'] as $value)
{
$check_msg=$value;
echo "Message sent to username<br>";
echo " $check_msg <br>";
}
<?
I want to display these checkbox value in a popup message after i press a submit button <input type="submit" name="submit" value="submit">

eon201
10-31-2007, 11:26 AM
Hi use 'alert' instead of echo.

manjunath1985
10-31-2007, 11:29 AM
Hi,
Thanks for your reply..
But how can i pass $check_msg in 'alert message'
Plz help me out with the code...

Inigoesdr
10-31-2007, 05:21 PM
You can't have those messages popup when you click submit unless you post the form with AJAX and receive the post data back from a PHP page. If you post the page to itself you will see the post data when the page reloads after you submit the form. You can however display the values with a popup in JavaScript by simply using document.getElementById() or similar. But they won't be saved(if you're processing them with PHP) until you submit the form.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum