Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with popup message

    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">

  • #2
    New Coder
    Join Date
    Oct 2007
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi use 'alert' instead of echo.

  • #3
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    Thanks for your reply..
    But how can i pass $check_msg in 'alert message'
    Plz help me out with the code...

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    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.
    Last edited by Inigoesdr; 10-31-2007 at 04:23 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •