SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Dublin
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Returning values to client

    I understand how to print values to the client side using echo. But how can I return values from the server and receive them on the client side so I can manipulate them?

  2. #2
    SitePoint Zealot Cute Tink's Avatar
    Join Date
    Apr 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure what you mean. Do you want to grab information, like from a database, manipulate it and then echo, or do you want to retrieve information so that you can edit it in HTML forms and then save it?

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Dublin
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cute Tink View Post
    Not sure what you mean. Do you want to grab information, like from a database, manipulate it and then echo, or do you want to retrieve information so that you can edit it in HTML forms and then save it?
    I'd like to reference it back on the client side so I can make another request on the server side

  4. #4
    SitePoint Zealot Cute Tink's Avatar
    Join Date
    Apr 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, then you would do your database call through your chosen method, i.e.:

    PHP Code:
    $result mysql_query("SELECT id, name FROM myTable");

    while (
    $row mysql_fetch_array($result)) {
        echo 
    '#' $row['id'] . ': ' $row['name'] . '<br />';

    Then you just substitute the echo line for your method allowing you to make your second request from the server, like a link or an HTML form.


Bookmarks

Posting Permissions

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