Inserting php into an Html page generated in DW CS4

Hi I am having my first attempt at running some php .
I have inserted the php code at the top of my page but it doesn't seem to be running and shows up in the source code?
www.matthamiltonracing.com
My host provider assures me it is supported.
Any suggestions, some previous posts mention htaccess. pages???
please advise
many thanks
Mark

Bregent and Ned have offered the correct answer. Your webhosting server will not know if it has to run any php code unless the page has the .php extension.
Here's a potential problem: If you are monkeying around with php, you'll need a testing server to upload your work to test. Dreamweaver won't allow you to test your work on your own computer, unless you set up Apache and create a testing server on it.
One of the things I have done recently was to create a testing server on my own home network using an older computer. Works great, but you may not have an older computer handy. So here's what I did with my webhost:
Generally your website has to be built so that its home page and its root is in /public_html/ on your server. You can "trick" Dreamweaver to think it's actually underneath that by creating a folder called /test that is underneath /public_html/ and nobody will be able to access your work as you work on it (unless you point a client to a specific page and specify the exact URL with the extra path for them to test). The advantage with this is that your testing server is set up to run php code with exactly the same php configuration as the server that will wind up serving your web page because it is your hosting server.
So, while you are testing, create a /test folder. And any page that is supposed to be processed by your php server needs to end in the .php extension.
Here's another trick:
Regular HTML can end in .php as well. So can rename your entire website with .php if you have a number of pages that use it.
You can also make your entire website .html, save just the pages that use php (this is what I do). So if I have a form that is going to do something that results in php, I'll make the form entrance html and the page that actually does the processing php.

Similar Messages

  • Can I insert an html file as an image into an HTML page?

    The site I'm working on (www.ngospen.com) has PNGs for background art - 10 - 15 kb per image. As the site is intended for settings with low bandwidth, I'd like these background images to be as small as possible.
    When saving for the web, one of the options is Save As HTML file. When I open the file, the artwork appears the same as the PNG (no lost resolution), but it is a much smaller file size (1 - 2 KB).
    Is it possible to insert these HTML files into my HTML pages?
    Thanks!
    Ken D
    Creative Director
    Grateful Creative

    Are you meaning that you work with fireworks?
    If so the html and the images you export are flattened images (slices), you have to put those images directly into your html page.
    If you want to save the file (fireworks) as a flattened image you could also goto save as -> flattened png.
    If you save your image from fireworks just as png it contains the layer information etc. etc. from fireworks, that's why you should save them as flattened png, or just export the slices.
    http://www.dreamweaverfan.nl

  • Insert JAVA3D CODE into a HTML PAGE

    My java 3d code is working perfectly with javac and java command. I can see the result of my game in the appletviewer
    But when I want to insert the code into a html page,it dosen t work
    the java applet remain grey....
    Can someone tell me why and someone can tell me how to solve it
    Could you give me an example of HTML page using java 3D code with mulitple classes

    I don't know Java3D, but I know a little applets. :)
    Are you sure your browser understands the 3D API ?
    applets work with AWT and JDK1.1, (it's your browser than run your applet and not your jdk 1.3 or 1.4), so peraphs you should download a plug-in to run Java3D in your browser ?
    for example, if you want to use swing, you have to download a plug-in in your browser.
    and another problem is that different browsers work differently with a same applet : for example, IE 6.0 don't run than IE 4.0 or Netscape 3.0
    it's the internet's way of life... :)
    Good luck,
    David
    PS : sorry for my english, I'm from Paris ! :)

  • Inserting Text into a web page

    I need to know how to insert text into a webpage, like google, search, and then get the result.
    Using the wonders of the internet I have been able to display a webpage, and see the HTML code that is generated, however, I don't know how to insert text into a web page, or get the result.
    Any help, or pointing into the right direction would be appreciated.

    What do you mean by insert into web page? Like
    prefill data on a form?
    Or like a search on google? What are you using to
    do this?
    I am guessing based on the info you gave in your
    question, that you might want to just look at the url
    of the page. For example search on google and you
    will see the text entered into the search field
    inside the url. Learn from that and develop a url
    that will search for the text you want to insert.
    If I am not understanding you, please clarify.Right now, I'm using the URL to search for me, which will work, but the search can be different from website to website, and I would like something closer to an automated form filler if I need to implement something like this again.
    Of course, something like an automated form filler would probably work better, if I were able to retreve the results

  • How to Convert an existing window into an HTML page

    Hi,
    I am trying to convert a window into an HTML page using Forte Web
    Enterprise.
    - The window has just the widgets without any code behind it.
    - How can I use the WindowConverter class, WindowToDocument method for
    it etc.....
    Any suggestions? Can I get a sample code if anyone has tried this.
    Thanks in advance
    Nafisa Husain
    CBSI, Chicago

    user8731258 wrote:
    Hi,
    I want to know how can i convert my application into a clustered application.
    my current application there are 5 modules and thses modules have 5-10 tables in common.Since these modules work simultaeously the processing time gets increased drastically.Is it possible that to have seperate instances of these tables and every module works independently and oracle take care of the consistency.
    I want to know if RAC could be the solution?Sounds like an application design issue. I think you'd be best served tracing the applications and see where the overhead is being introduced when they do their process concurrently.
    Throwing RAC at a poorly developed application would do nothing except amplify the poor design (it'll make things worse).
    Cheers,

  • How to embed a swf video into an html page?

    I am haing trouble embedding my swf video into my html page. Here is my code:
    <embed height="340" width="549" src="flashvideos/test.swf" allowscriptaccess="always" allowfullscreen="true" flashvars="&amp;MM_ComponentVersion=1&amp;skinName=C:/Users/RogerPa1/Documents/Visual Studio 2008/WebSites/WebSite1/Products/Create/flashvideos&amp;streamName=C:\Users\RogerPa1\Docum ents\Visual Studio 2008\WebSites\WebSite1\Products\Create\flashvideos\Robotics&amp;autoPlay=true&amp;autoRew ind=false"></embed> 
    When I run the page the place where the flash player should be is blank. But if I right click I can select settings so the flash player is there. I'm using absolute urls for the flashvars because I read in a forum that that's what you're supposed to do. Anyway I am a little frustrated that the video won't play. I tried creating a video with no skin and the same problem occurs.
    Thank You
    idesofdecember

    Answered

  • Cursor placed in 2nd character position of an HTML page generated thru Web Bean.

    I am not sure if others have noticed it but in my HTML page (generated thru EDitCurrentRecord web bean), the cursor is not always placed in the first character position of a text box/text area.
    Is there a way that I can ensure that the cursor starts blinking in the first character position always (instead of the 2nd or 3rd character position)?
    Thanks in advance!

    This is a bug. I don't have a workaround for you. I will fix it in the next release.

  • Insert one html page into another html page

    Hi there,
    I wonder if sombody can help. I am trying to insert one short
    html page into another page. I could not find any option or feature
    in Dreamweaver that allow me to insert the page at all. The page I
    want to insert has the links and it is a short page, just like a
    banner. When I update the links on that page it will update all
    other pages in the website. I do not have to open many pages to
    update. I have been using FrontPage and I am now converting to
    Dreamweaver. Some codes from FrontPage does not work in
    Dreamweaver. I would very much appreciate if somebody can help with
    the codes.
    This is my website so that you can understand what I mean. At
    the top of the screen there are many links that are from one page I
    inserted into index.html. I use FrontPage. But, Dearmweaver does
    not work that way.
    Thank you. Kevin

    Be aware that IFrames carry all the disadvantages that frames
    do, for both
    you and your client's visitors.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "polarl light" <[email protected]> wrote in message
    news:g06ad0$2rm$[email protected]..
    >
    >> I wonder if sombody can help. I am trying to insert
    one short html page
    >> into
    >> another page. I could not find any option or feature
    in Dreamweaver that
    >> allow
    >> me to insert the page at all. The page I want to
    insert has the links
    >> and it
    >> is a short page, just like a banner. When I update
    the links on that
    >> page it
    >> will update all other pages in the website. I do not
    have to open many
    >> pages
    >> to update. I have been using FrontPage and I am now
    converting to
    >> Dreamweaver.
    >> Some codes from FrontPage does not work in
    Dreamweaver. I would very
    >> much
    >> appreciate if somebody can help with the codes.
    >
    > Depending on what you want to do you can use SSIs or an
    Iframe. SSIs are
    > good for things such as headers, menus and nav bars that
    you want to stay
    > the same across a range of pages. Iframes let you load
    an external HTML
    > file into a predefined area of your page so you can
    display different
    > content while staying on the same page.
    >

  • Inserting Image on a HTML page through servlet

    I want to insert an image on a HTML page which will be generated by a servlet.For that I have written the <IMG SRC>tag.But my doubt is where to store the image(i.e in which directory of the web server) I should store the Image.I am using JavaWebServer2.0.
    please help

    You can put your images in public_html directory.

  • Problem inserting FLV into template based page DW8

    Error when inserting an FLV into a template based page.
    The error is: "Making this change would require changing code
    that is locked by a template or translator. The change will be
    discarded."
    I thought perhaps something was wrong with my code so I
    created a new page in DW8, with one word of text. Saved the new
    page as a template with the one word of text made into an editable
    region. Created a page based on that template and attempted to
    insert a FLV file into the editable region (using Insert > Media
    > Flash Video). I still get the error message. I've attached the
    code for this page.
    I also get the error message when I go through the tutorial
    Presenting
    Video with the Flash Video Component in Dreamweaver 8. Using
    the files provided in the tutorial.
    Is the only workaround for this the one I found here?:
    http://med.stanford.edu/irt/web/references/flash_video_installation.html.
    Steps are under heading "Workaround for Locked Code insert error"
    near bottom of page.
    Any help is appreciated.
    Jen

    > Is the only workaround for this the one I found here?:
    >
    http://med.stanford.edu/irt/web/references/flash_video_installation.html.
    > Steps
    > are under heading "Workaround for Locked Code insert
    error" near bottom
    > of
    > page.
    This workaround *will* work....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "kilmeny21" <[email protected]> wrote in
    message
    news:[email protected]...
    > Error when inserting an FLV into a template based page.
    >
    > The error is: "Making this change would require changing
    code that is
    > locked
    > by a template or translator. The change will be
    discarded."
    >
    > I thought perhaps something was wrong with my code so I
    created a new page
    > in
    > DW8, with one word of text. Saved the new page as a
    template with the one
    > word
    > of text made into an editable region. Created a page
    based on that
    > template and
    > attempted to insert a FLV file into the editable region
    (using Insert >
    > Media >
    > Flash Video). I still get the error message. I've
    attached the code for
    > this
    > page.
    >
    > I also get the error message when I go through the
    tutorial
    >
    http://www.adobe.com/devnet/flash/articles/flv_tutorial.html.
    Using the
    > files
    > provided in the tutorial.
    >
    > Is the only workaround for this the one I found here?:
    >
    http://med.stanford.edu/irt/web/references/flash_video_installation.html.
    > Steps
    > are under heading "Workaround for Locked Code insert
    error" near bottom
    > of
    > page.
    >
    > Any help is appreciated.
    > Jen
    >
    >
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml"><!--
    InstanceBegin
    > template="/Templates/index.dwt"
    codeOutsideHTMLIsLocked="false" -->
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <!-- InstanceBeginEditable name="doctitle" -->
    > <title>Untitled Document</title>
    > <!-- InstanceEndEditable -->
    > <!-- InstanceBeginEditable name="head" --><!--
    InstanceEndEditable -->
    > </head>
    >
    > <body>
    > <!-- InstanceBeginEditable name="temp"
    -->Text<!-- InstanceEndEditable -->
    > </body>
    > <!-- InstanceEnd --></html>
    >

  • Php script on html page?

    how would i insert a php {login script} on a .html page? would i have to externally link to the file?

    any ideas? i have tried putting "<?php" and "?>" at the begining and end, but it still does not like it... on the webpage, "Click Here to Register'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']);  //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); }else {  // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour);  //then redirect them to the members area header("Location: test_members.php"); } } } else {  // if they are not logged in ?>" shows, then the login box.

  • Use PHP to convert html page to a pdf file for email

    I want to use my php scripts to send an email (with a pdf attachment) of the web page that is being viewed.
    My problem I have no way to convert the html page to a pdf file without the end user being prompted to (1) naming the file (2) saving it
    Is there a program or a way i can save the html as "auto_name.pdf" file on the server without user input?
    I have Adobe Acrobat 6.0 Professional on server

    There are lots of good Html to Pdf conversion tools for developers, both free and paid. I'd suggest to take a look at PD4ML Html to Pdf converter - it has lots of features (CSS support, page layout presets, etc.) and can be obtained for free for non commercial usage. There is also a topic at Stackoverflow with a list of such converters.

  • HTML page generated by Netweaver studio is very big

    Hi,
    Is there any way to make the generated HTML pages (when developing a web dynpro application from Netweaver studio) smaller in size  ?
    It appears to be big even for a very simple hello world page.
    Thanks.
    Regards,
    Daniel

    No, I don't think so.
    The generated html code cann't be altered.
    Regards,
    Ashwani Kr Sharma

  • Looping through an array to insert contents into an HTML table

    Im trying to loop through a String array and insert the contents into an html table, unfortunately my coding is only filling in the first row in the table and ignores any additional info. Im using webservices that is connecting to a table in the database.
    Info = ID + ";" + played + ";" + won + ";" + lost + ";" is the String im pulling into my client.
    <table border = "1">
    <tr>
    <td><b>ID</b></td>
    <td><b>played</b></td>
    <td><b>won</b></td>
    <td><b>lost</b></td>
    </tr>
    <%
    try {
         leglessclient.LegendServiceService service = new leglessclient.LegendServiceService();
         leglessclient.LegendService port = service.getLegendServicePort();
    String Info = port.displayLog();
    String[] log = Info.split(";");
    out.println("<tr>");
    for (int a = 0 ; a < log.length; a++) {
    for (int b = 0 ; b < 4; b++){
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    b++;
    out.println("</tr>");
    out.println("</table>");
    } catch (Exception ex) {
         // TODO handle custom exceptions here
    %>
    Any help would be greatly appreciated
    thanks!

    firstly, if you have multiple rows.. you need to start each row with <tr> and end with a </tr>. You just have one in the beginning and end,which will obivously give data in one row.
    out.println("<tr>");
    for (int a = 0 ; a < log.length; a++) {
    for (int b = 0 ; b < 4; b++){
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    out.println("<td>" + (log[a]) +"</td>");
    a++;
    b++;
    out.println("</tr>");

  • Including the results of a jsp into an HTML page

    Hey everyone,
    I am trying to include the results of a jsp inside an HTML page (HTML served by Apache, JSP served by Tomcat).
    Is there any straight way of doing this - say using Ajax or some javascript? I have been experimenting with ajaxinclude from DynamicDrive.
    Appreciate the help,
    Ankush

    Well, u can do one thing, may not be a proper method...
    one way is to call the jsp page using ajax and the output of the jsp page can be converted to an xml and this xml can be read by the ajax program.

Maybe you are looking for

  • MacBook Pro is randomly shutting off.

    When it restarts the date and time reset to something like January 1, 2000 before changing back to the correct date and time several minutes later. Two months ago I had a problem with overheating with my Macbook that the Apple Store took care of. Any

  • Regarding  input combo box list of values

    Hi, I am using JDev 11.1.1.5.0 I used the input combo box list of values in adf application based on VO.When I type a value in the input combo box and press TAB key,it gives first item of that list rather than that entered value and when I open the l

  • Unable to create DTP

    HI I am trying to create DTP for a master data infobject, before i do any change, i m getting a message "Enter a valid value" and am unable to proceed further plz help Regards

  • T420 Wireless issues

    My wireless will disconnect with the small yellow "!" on the bottom right. I will have no internet untill I click on the wireless icon on the bottom right and the list of all available connections pops up and it somehow reconnects me immidiately. Thi

  • Gain acess to my bbworld music without a bb

    hello im hoping someone can help me with this  i have spent over $200 on music from the app world then my phone broke so i got a different one , not a black berry and i would like to sign in to the app world to download the songs but it wont let me w