Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Nov 2006
    Location
    Liverpool/Manchester
    Posts
    2,457
    Tokens
    0

    Latest Awards:

    Default Need help with mysql and php please :)

    Hey,

    I have started making nexdana so that it runs from a mysql database. All is going well except pages with php in arn't working.

    I don't really know how this works, I only know how to add / edit pages within the database as Calon set it up for me

    An example of a page not working is this... http://www.nexdana.com/v3/index_new.php?pageId=7

    As you can see the php bits at the top and bottom arn't working

    If anyone can help it would be much appreciated

    Thanks

    Joe
    Joe


  2. #2
    Join Date
    May 2008
    Posts
    605
    Tokens
    0

  3. #3
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    Nice bubble shift game, glad youve got it sorted =]
    Back for a while

  4. #4
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    You need to post the code or no one will know what's wrong with it
    Lets set the stage on fire, and hollywood will be jealous.

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by Excellent1 View Post
    Your code isn't being properly closed off somewhere. Post it?
    That's not what is wrong.

    Are you echoing it all out, or doing sort of a "template system"?

    If not.. it looks like it doesn't have PHP installed on your server.. as it's being executed as HTML and not PHP.

  6. #6
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Since when could you execute PHP from MySQL Rows? :S

  7. #7
    Join Date
    Nov 2006
    Location
    Liverpool/Manchester
    Posts
    2,457
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Calon View Post
    Since when could you execute PHP from MySQL Rows? :S
    I don't know..... if I had known you can't, i would have stuck with iframes................................
    Joe


  8. #8
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    You can exec it, using eval(). Just wouldn't recommend it.

  9. #9
    Join Date
    Nov 2006
    Location
    Liverpool/Manchester
    Posts
    2,457
    Tokens
    0

    Latest Awards:

    Default

    I'll have to stick with iframes then
    Joe


  10. #10
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by iJoe View Post
    I'll have to stick with iframes then
    Iframes are tacky, this code should act like an Iframe.

    INDEX.PHP
    PHP Code:
    The top of your layout code will go here
    <?php
    $p 
    addslashes$_GET['page'] );
         if( isset ( 
    $p ) ) {
              
    $p "/content/" $p ".php";
                   if( 
    file_exists $p ) {
                        include( 
    $p );
                   }
                   else {
                        include( 
    "404.php" );
                   }
         }
         else {
              
    $p "/content/indexpage.html";
              include( 
    $p );
         }
    ?>
    The bottom of your layout code will go here
    To use it you just go to index.php?p=pagename and it would include yoursite.com/content/pagename.php
    Lets set the stage on fire, and hollywood will be jealous.

Page 1 of 2 12 LastLast

Posting Permissions

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