Complete broke/dummy needs help.../permission?

Discussion in 'PHP' started by mipa jim, Mar 22, 2006.

  1. #1
    I'm trying to develop a mockup for new entry page to my site. The hope is that I can convey with the mockup what I simply can't convey with words as I never seem to explain myself very well. ANd no one ask me anything. Damn I feel like the Maytag Man. (EXcept I'm old, lonely, and stupid) :)

    Anyway, here is the thing... I have this as an entry page page now. it was my first and only attempt at trying my hand at css from scratch.

    http://www.earrelaphant.com/index.html

    The guts of my site really runs on php script and is located at (I don't know php either)


    http://www.earrelaphant.com/community/index.php

    Now the arcade has all these nifty little php queries going on like "Max's Interesting Tidbit's" , And "Top LinKs", etc...

    Ok, so I'd like to promote link partners and showcase a lot of what these queries show and do on my new entry page which will eventually be placed in the root directory.

    The concept/mockup page I'm working on (waiting on mascot and background art)(been waiting for long..long long time) is located here for the time being:
    http://earrelaphant.com/earrelaphantfiles/test/entry.php

    Now, of course I've tried just simply coping and pasting the queries from the arcade, that of course didn't work, I've tried using includes, which is they way I left it.

    I'm pretty sure at this point in time that I have to set permission to database, user.. etc... for this page/path/ or something..

    If I'm right.. what is the best way for me to do this? Can I do something in the existing permissions somewhere?
     
    mipa jim, Mar 22, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There may be a database connection file you need to include at the start of the page?
     
    mad4, Mar 23, 2006 IP
  3. mipa jim

    mipa jim Peon

    Messages:
    261
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well now I know what to call it. I most likely even know what to put in it too. database name, user name, and user password? But, where would I put such an animal and what else needs to go in it? Can't just put that info on the page for the whole world to have.
     
    mipa jim, Mar 23, 2006 IP
  4. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can just put it on the page. Its in the php code so it won't show up in the html code.

    Check where it is on your other pages and add it in the same place. On my sites its stored in an include file which I include at the very top of each php page.
     
    mad4, Mar 23, 2006 IP
  5. onlyican.com

    onlyican.com Peon

    Messages:
    206
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    FOr connection files, it is best to use include files (but php extension)

    My db connection file is as soo (minus the details)

    <?
    $db = mysql_connect("host","user","pass");
    mysql_select_db = ("databse),$db);
    ?>
     
    onlyican.com, Mar 23, 2006 IP
  6. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You need to make sure your include files are inside

    <?php

    include("filename");

    ?>

    You have includes getting displayed on your page so that is probably part of your problem, they aren't inside <?php and ?>
     
    woodside, Mar 24, 2006 IP
  7. mipa jim

    mipa jim Peon

    Messages:
    261
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    One problem down.
    Thanks.

    The requires at top of page are enclosed in < ? php ?
    I was told to use requires .. at top should it be include? , i've tried both

    And is their a more elegant syntax to write path
    include('http://www.earrelaphant.com/..../...../.... ?
     
    mipa jim, Mar 24, 2006 IP
  8. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Are you trying to include remote files? If not then you shouldn't use the "http://" just use the path to the file:

    include('/var/www/html/mywebsite/myfile.php');
     
    woodside, Mar 24, 2006 IP
  9. mipa jim

    mipa jim Peon

    Messages:
    261
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    No sir they aren't remote, all same domain. Let me work on that mess then.
     
    mipa jim, Mar 24, 2006 IP
  10. mipa jim

    mipa jim Peon

    Messages:
    261
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I think it's horrible when you just know it's right there in front of you somewhere. And you still looking into the abyss hours and days later. Good thing is the art work is still not here even after almost two months. So oh well no hurry figuring this out either.

    Atleast I am still pretty sure it can be done.
     
    mipa jim, Mar 24, 2006 IP
  11. meikeric

    meikeric Peon

    Messages:
    58
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    If you need some more in depth PHP help, PM me. No charge.
    Mike
     
    meikeric, Mar 24, 2006 IP
  12. mipa jim

    mipa jim Peon

    Messages:
    261
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thanks everyone...

    It all boiled down to path issue. in the hands of a dummy.
    If you wanna see what it looks like now. It's going to change daily for some time until it actually hopefully someday replaces homepage.
    http://www.earrelaphant.com/patio.php

    Jim
     
    mipa jim, Apr 1, 2006 IP