SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Communicate with PHP

    Hi,
    i need to proved a PHP page to a remote server to a non technical user. so i need to give them some code which is very easy to impliment. like a javascript that calls my php. this i can do easily, the tricky part is that i need to re-call this php script with different parameters. ie. i would need to call mypage.php?pageID=123&subPageID=456 and this needs to update the clients page without reloading. i tried using DOM but when i try to write the returned html i get Object HTMLscriptElement.

    i dont think iframes are a good idea as its across domains and in addition i still need javascript to write before php is processed which cannot be done. this is because i need to get the domain of the page with the iframe to validate it.

    the only solution i see is php include but i am not sure if this could update the client page dynamically.

    the real problem is that i need to keep the php on my server in order to protect my code and only give out the html.

    any advise would help

    thanks
    Pedge

  2. #2
    SitePoint Addict NikoB's Avatar
    Join Date
    Nov 2005
    Location
    Austria
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php include does no update the client page dynamically. the only way i see to do this is to use ajax (see http://en.wikipedia.org/wiki/Ajax_%28programming%29 )

    Niko
    Corinis OpenSource Community & Content Management
    http://www.corinis.org


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
  •