SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: help

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help

    im doing a random query on my site for 2 things 1 my affiliates which works very well..
    <?php include "affiliates.php";?>

    everytime you refresh the page a new list of affiliates come up, but when i put
    another random query which is
    <?php include "randomtut.php";?> which are random tutorial images that come up in an include it joins with the affiliates one im asking how to get them to work seperatly or whatever

    thanks!!!
    drak
    Last edited by drakkar; Nov 13, 2004 at 19:16.

  2. #2
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, well, even though you didn't bother to properly name your thread, I was still going to help you.

    So I visit your site, and I see "*******" as the first thing. Very polite, just what I wanted to see from someone asking for help.

    Well, *******, fix it yourself.
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    umm sorry.. im just looking for help

  4. #4
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, but 99% of people posting in this forum are looking for help - you don't see all their thread titles as "Help". Try and actually be descriptive. And yeah, don't point us to sites that have worthless vulgarity, like Eric said.

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok nvm ill go somewhere else.. I didnt know what to label my title

    peace

  6. #6
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about "How to include 2 files"? I can't even understand your post, how about using periods and sentence structure? And explaining what you need done a bit more specifically.

  7. #7
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what i am saying is i have to 2 random queries for images. 1 is called affiliates.php, the other one is called randomtut.php. I put affiliates.php in an include <?php include "affiliates.php";?>, and randomtuts in an include >> <?php include "randomtut.php";?> when i put both of them on my site they mix together when there both on different pages www.complexgfx.com/affiliates.php , and www.complexgfx.com/randomtut.php

    this is what it looks like www.complexgfx.com/template2.php

    i hope this makes a little more sense

  8. #8
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that all makes sense - I got the jist of that from the first post. The thing is, yuo still haven't asked a question

    The 2 includes you did will work just fine - you can put more than 1 inculde on the page. What's the problem?

  9. #9
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the images mix together the affiliates and the tutorials

  10. #10
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then that's an HTML problem, no? You realize includes are server side, eh? Click view source and take a look at what's misformated. You probably have some CSS positioning wrong, or a mis table (if you still use tables)..

  11. #11
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    michigan
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i used the same code with different images but its odd since there on seperate pages

  12. #12
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, they aren't on seperate pages. PHP is erver side - using include just blocks in the chunks of code. Go to the page and hit view -> source, and you'll see the 2 blocks of code from affiliates.php and randomtut.php sitting in the source, you won't see an include call. The problem that you have is the way you're laying out your template. It's an HTML problem, not a PHP one.


Bookmarks

Posting Permissions

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