#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Adelaide
    Posts
    72
    Rep Power
    13

    php and javascript


    Hi,
    I have a javascript function returning a value. I would like to know how I can use this value in my php code.

    I am using a switch statement.

    switch("") <--- i want to use that value from my javascript
    function in here !
    {
    case 1: blah blah
    }

    How can I do this??

    Thanks for any replies.......

    yoshi
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Feb 2001
    Posts
    1,474
    Rep Power
    15
    Hi,

    You need to submit the javascript value to the server so your php script can get it.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Adelaide
    Posts
    72
    Rep Power
    13
    Thanks for the reply. I know that javascript is client side and php is server side. The thing I wanna know is how do I go about doing this.

    Thanks.

    Yoshi
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Feb 2001
    Posts
    1,474
    Rep Power
    15
    see this thread:

    Using Javascript with PHP
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Adelaide
    Posts
    72
    Rep Power
    13
    Thanks alot ! Appreciate it

IMN logo majestic logo threadwatch logo seochat tools logo