can you edit php code in a web builder?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jonny5
    Private First Class

    • Jul 2007
    • 6

    can you edit php code in a web builder?

    I have a flash portal and I need to redesign the layout so I can add pics, links, background ect... but when I insert the php code into a web builder like dreamweaver or front page. It doesn’t show the page in the design aria as is dose on the web page. Here is the portal.php code so you may try.


    portal.php
    Code:
    <html>
    <head>
    <title>Flash Portal</title>
    </head>
    <body>
    <?php
    require("dbconnect.php"); 
    
    echo("<font size='4'><strong>15 Most Recent</strong></font>");
    //displays most recent flash using a while loop
    $query = "SELECT * FROM flash ORDER BY flashid DESC LIMIT 15";
    $result = mysql_query($query);
    $i = 0;
    while ($row = mysql_fetch_array($result))
    {
    //increases printed number for flash by one
    $i++;
    //declare varibles
    $score = stripslashes($row['score']);
    $title = $row['title'];
    $flashid = stripslashes($row['flashid']);
    
    //print flash submission
    echo($i);
    echo(" - ");
    echo("<a href='view.php?id=");
    echo($flashid);
    echo(">$title</a>");
    
    //tells if submission is excellent (score higher than 7.0), okay (score between 3.0 and 7.0), or bad (score lower than 3.0)
    if ($score <= 3.0)
    {
    echo("(Bad!)");
    }
    else if ($score > 3.0 && $score <= 7.0)
    {
    echo("(Okay)");
    }
    else if ($score > 7.0)
    {
    echo("(Excellent!)");
    }
    echo("<br>");
    }
    
    echo("<font size='4'><strong>15 Most Viewed</strong></font>");
    //displays 15 most viewed flash
    $query = "SELECT * FROM flash ORDER BY views DESC LIMIT 15";
    $result = mysql_query($query);
    $i = 0;
    while ($row = mysql_fetch_array($result))
    {
    //increases printed number for flash by one
    $i++;
    //declare varibles
    $score = stripslashes($row['score']);
    $title = $row['title'];
    $flashid = stripslashes($row['flashid']);
    
    //print flash submission
    echo($i);
    echo(" - ");
    echo("<a href='view.php?id=");
    echo($flashid);
    echo(">$title</a>");
    echo("<br>");
    }
    
    echo("<font size='4'><strong>Top 15</strong></font>");
    //displays 15 top flash (ordered by highest score)
    $query = "SELECT * FROM flash ORDER BY score DESC LIMIT 15";
    $result = mysql_query($query);
    $i = 0;
    while ($row = mysql_fetch_array($result))
    {
    //increases printed number for flash by one
    $i++;
    //declare varibles
    $score = stripslashes($row['score']);
    $title = $row['title'];
    $flashid = stripslashes($row['flashid']);
    
    //print flash submission
    echo($i);
    echo(" - ");
    echo("<a href='view.php?id=");
    echo($flashid);
    echo(">$title</a>");
    echo("<br>");
    }
    
    //finish up page by adding end tags
    ?>
    </body>
    </html>
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: can you edit php code in a web builder?

    No PHP code won't be execute the php code and display it with a website builder, atleast not Dreamweaver. (In most cases the code wouldn't work, especially code that connects with a database, unless its on the server).

    Anyway, its irrelevant anyway. In order to make changes to a flash template you need to use a program that edits Flash. You will also need the flash source file in order to do any edits. (Flash source files are compiled into the files that you would execute on the website or on your computer)

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    Working...
    X