Results 1 to 4 of 4

Thread: Php output as html page

  1. #1
    Join Date
    Feb 2009
    Posts
    78

    Php output as html page

    I am trying to add some dynamic content to an existing HTML page, which will allow my visitors to select any image from a form and when they submit they would be taken to a page where they can copy and paste the code. The problem over here is i can't echo the html code. Does anyone know how to Echo html and i am trying to use the following code.

    PHP Code:
    if ($file == "one"){ 
    echo 
    "<embed src="$url_1" width="$width" height="$height" type="application/x-shockwave-flash"></embed>"

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    PHP Programming html output

    In that case you can use the below code for echo where both are same. . If you use single quotes, your html should have double quotes. The second one uses single quotes in the html, but has the added benefit of allowing newlines and such. You could combine the two and have both benefits, so it totally depends upon you which echo u want to use

    PHP Code:

    echo '<a href="http://forums.techarena.in">Link</a>';

    echo 
    "<a href='http://forums.techarena.in'>Link</a>\n"

  3. #3
    Join Date
    Feb 2009
    Posts
    78

    Php output as html page

    I am very much confused with it can you provide me the full code in a proper way so that it would be very simple for me to understand the code because i am not able to understand it. I would be very thankful to you.

  4. #4
    Join Date
    Jan 2009
    Posts
    126

    Php output as html page

    Try to use the following code and you would be able to have Php output as html page

    <?php

    $url_1 = $_POST['url'];
    $fil_1 = $_POST['file'];
    $width_1 = $_POST['width'];
    $height_1= $_POST['height'];


    if ($file == "one"){
    echo "<embed src=\"$url_1\" width=\"$width_1\" height=\"$height
    _1\" type=\"application/x-shockwave-flash\"></embed>";
    }

Similar Threads

  1. How to jump down in a Html page
    By Ron1 in forum Software Development
    Replies: 2
    Last Post: 13-06-2009, 06:14 PM
  2. How to embed a WMV into an html page
    By Ameyaa in forum Software Development
    Replies: 2
    Last Post: 19-05-2009, 10:37 AM
  3. Study a web page using HTML
    By XDRoX in forum Tips & Tweaks
    Replies: 1
    Last Post: 25-02-2009, 02:27 PM
  4. VB6.0 link html page
    By Taipai in forum Software Development
    Replies: 3
    Last Post: 26-01-2009, 06:34 PM
  5. page's HTML preload
    By screwball in forum Software Development
    Replies: 5
    Last Post: 24-09-2008, 05:56 PM

Tags for this Thread

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
  •  
Page generated in 1,713,931,701.35977 seconds with 16 queries