Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: php embed in textbox.......

  1. #1

    Cool php embed in textbox.......

    Hi There...

    Embedded this in a text box..... Html Hi There... displayed.... Php Buy There... did NOT display...Why?

    <!DOCTYPE html>
    <html>
    <body>

    <p>Hi There.......</p>

    <?php
    echo "Buy There......"
    ?>

    </body>
    </html>

    Thanks and Have a Great Day....
    Last edited by Bronco Billy; 04-04-2013 at 12:53 AM.

  2. #2
    Senior Member 1FugleyKiwi's Avatar
    Join Date
    Jan 2011
    Location
    Playford Waters, South Australia
    Posts
    476

    Default

    Quote Originally Posted by Bronco Billy View Post
    Hi There...

    Embedded this in a text box..... Html Hi There... displayed.... Php Buy There... did NOT display...Why?

    <!DOCTYPE html>
    <html>
    <body>

    <p>Hi There.......</p>

    <?php
    echo "Buy There......"
    ?>

    </body>
    </html>

    Thanks and Have a Great Day....
    I assume your page is pagename.html, therefore the server doesn't know you want it to run php, as it would if your page was named pagename.php.

    You will need to add "AddType application/x-httpd-php .html .htm" to your server's .httaccess file.

    Others may know more about php and have other ides, but that is the only way I know to run php on an html page.

    HTH

  3. #3
    Senior Member RayC's Avatar
    Join Date
    Apr 2010
    Location
    Toronto-ish, Canada
    Posts
    1,732

    Default

    Or just go to Publish View and edit the extension to change it to .PHP
    Ray Cambpell
    Sounds In Sync
    Linked in

  4. #4

    Cool

    Quote Originally Posted by 1FugleyKiwi View Post
    I assume your page is pagename.html, therefore the server doesn't know you want it to run php, as it would if your page was named pagename.php.

    You will need to add "AddType application/x-httpd-php .html .htm" to your server's .httaccess file.

    Others may know more about php and have other ides, but that is the only way I know to run php on an html page.

    HTH
    So then it will work on my Server...... BUT what about the rest of the World....... It won't Work on THERE Servers unless They Also Make the Changes.....

    NO CIGAR........

  5. #5

    Cool

    Quote Originally Posted by RayC View Post
    Or just go to Publish View and edit the extension to change it to .PHP
    Changed the index.html to index.php...... the page DID display Hi There.... and Buy There.... But it Destroyed the rest of the Application...
    NO CIGAR......

  6. #6
    Senior Member gotFusion's Avatar
    Join Date
    Jan 2010
    Location
    www.gotHosting.biz
    Posts
    4,529

    Default

    Quote Originally Posted by Bronco Billy View Post
    Changed the index.html to index.php...... the page DID display Hi There.... and Buy There.... But it Destroyed the rest of the Application...
    NO CIGAR......
    ???????????
    NetObjects Fusion Cloud Linux enabled Web Hosting, support + training starts at $14.95
    NetObjects Fusion web Hosting and support + ASP + PHP + ColdFusion + MySQL + MS SQL
    FREE NetObjects Fusion Support & training comes with all web hosting accounts
    NetObjects Fusion Web Hosting: http://www.gotHosting.biz

  7. #7
    Senior Member 1FugleyKiwi's Avatar
    Join Date
    Jan 2011
    Location
    Playford Waters, South Australia
    Posts
    476

    Default

    Quote Originally Posted by Bronco Billy View Post
    So then it will work on my Server...... BUT what about the rest of the World....... It won't Work on THERE Servers unless They Also Make the Changes.....

    NO CIGAR........
    No Billy, no.

    What your viewers get is what is served to them by YOUR server. Simple, really, when you think about it. You DO understand how the interwebby thing works, don't you?

    Try the hack i gave you.

    If it works, great. if it doesn't, well google is usually my friend in these situations.

  8. #8

    Cool

    Quote Originally Posted by 1FugleyKiwi View Post
    No Billy, no.

    What your viewers get is what is served to them by YOUR server. Simple, really, when you think about it. You DO understand how the interwebby thing works, don't you?

    Try the hack i gave you.

    If it works, great. if it doesn't, well google is usually my friend in these situations.
    You are Right.... You are Right.......

    I'm gonna Try it Now..... I'll Repost when it Works!!!!!!!!!!!

  9. #9

    Default

    Quote Originally Posted by gotFusion View Post
    ???????????
    Have You Tried This? Ie. index.html to index.php???? WITHOUT Messing things up in the Rest of the Application..... If So what am I doing wrong ????? THIS to me would be the BEST Solution........ Again it executes the PHP but losses Graphics etc........

  10. #10
    Senior Member RayC's Avatar
    Join Date
    Apr 2010
    Location
    Toronto-ish, Canada
    Posts
    1,732

    Default

    You're not providing much information for folks to help you.

    What do you mean by "the Rest of the Application"?

    Are you referring to NOF itself or the code on the web page?

    What exactly happens that gets "messed up"?

    I have done this many times and never had a problem. If I use a PHP Include to embed a script, I edit the page extension to be "PHP" so the web server will translate the PHP code into HTML. Works every time.
    Ray Cambpell
    Sounds In Sync
    Linked in

Posting Permissions

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