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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript Variable into PHP

    Hello,
    I've tried everything i could,

    But am unable to get this thing going...

    I have this variable set in javascript
    test12345.php?ref=kavita

    And i desire to pass the javascript variable into php and display
    echo "$refid";

    Where ref=$refid

    Please Help

    Regards
    Amit

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Is that goin through the url? If it is, then you need to use
    PHP Code:
    <?php
    echo $_GET['ref'];
    ?>


  •  

    Posting Permissions

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