Results 1 to 5 of 5

Thread: How is the value in output form updated in this example?

  1. #1
    Join Date
    Apr 2009

    How is the value in output form updated in this example?

    I am a novice developer, and am trying to teach myself php. I sometimes take a look at the php script of some websites to learn how they are doing a specific thing. I came across this webpage yesterday which takes a input url on one page and on the output page, it outputs a embed link through a form - means it outputs a form, whose text value is the desired link that user cancopy/paste in his website. When I downloaded the output page's php file, there was no php code in it. It was all html (I downloaded the original php file and not the source code from within the brower). I am quoting the html directly from the output PHP file:
    <input type="text" name="embedurl" id="embedurl" value="http://www.xxxxxx.com/.php?link=" size="100">

    But on the output page, the value in the form field looks like this:

    What I couldn't understand is how does this link dynamically gets updated when this php page outputs the result, when there is no php code in this script??

  2. #2
    Join Date
    Jun 2003
    PHP is server side, it doesn't appear in the page, it generates the HTML.

    Show me the link and I'll try to explain the code behind it as I understand it.
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

  3. #3
    Join Date
    Apr 2009
    Ok.. the site is "www DOT bollyaz DOT com" ..... its a site that takes video links from zshare.net and generates a code to embed those videos. I found this zshare video link online, so you could copy paste it in the site form to test how it works: -
    I was interested in knowing how is this site probably doing it. So I checked using firebug that the form on index page is being submitted to 'process.php'. I checked the content of process.php, and it doesnt have anything much either. Then the ouput script is output.php, thats where the form lies which I asked original question about.
    Thanks for the tips..

  4. #4
    Join Date
    Nov 2008
    How are you checking the php scripts? The scripts are stored on the server and are not readable from a browser. Only their output ever gets sent to the browser. Or do you have access to the scripts themselves on the server?

  5. #5
    Join Date
    Apr 2009
    Oh my bad!! I guess that was the problem.. I never thought of this point that even if I enter the php script address in the address bar, it still only send the html content to the browser. What I was seeing was the html code and I was thinking otherwise.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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