Jump to content

kade119

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Posts posted by kade119

  1. i have wamp setup and currently have a few virtual host setup and working but i'm finding some PHP not working properly on my server but is on other servers, so my first assumption is that it's the php.ini file, could someone look at it for me and tell me if anything should be configured differently.

     

    The notices i'm receiving :

    Notice: Undefined index: sent in C:\wamp

     

    it seems to be affecting sessions that post or get

     

    appreciate any support.

     

     

    -file attached

     

    [attachment deleted by admin]

  2. So say i have this:

     

    <link rel="stylesheet" media="all" type="text/css" href="_css/styles.css" />

     

    now the file that is linking to that is 3 directories deep, besides using a rel or absolute link, could i define the path by using something like this

     

    <link rel="stylesheet" href="<?php require($_SERVER['DOCUMENT_ROOT'] . "/_css/portfolio-styles.css"); ?>" type="text/css" />

     

    but this is actually opening the CSS in the header

     

    thanks for any explanation on how to do this

  3. I'm starting this thread because there are not many actual exercises for beginners learning PHP only tutorials.  So what I'm asking, is for any of the PHP coders out there to begin posting one or two exercises that might be useful to novice PHP coders to work with.  Please post your exercise and the answer to it at the bottom of the your post.  Thank you.

  4. Let me tell you what i'm trying to accomplish:

     

    I want a way to play a flash mp3 player that will not start over each time a new page loads, so i thought i could have php includes swap each time i click on a new menu item that way my page doesn't refresh... would this be an appropriate way of achieve this?

     

     

    please know im new to PHP and found the below script  --Thanks

     

     

    <?
    if ($_GET['part'] == 'page1.php')
    include('page1.php');
    elseif ($_GET['part'] == 'page2.php')
    include('page2.php');
    elseif ($_GET['part'] == 'page3.php')
    include('page3.php');
    
    ?>
    
    
    [code=php:0]
    <a href="index.php?part=page1.php">Page 1</a>
    <a href="index.php?part=page2.php">Page 2</a>
    <a href="index.php?part=page3.php">Page 3</a>
    

     

    [/code]

  5. need assistance in complete this function, not sure if i'm implementing it correctly

     

    this echo, can it be written like that?

    echo "<img src='../graphics/$banner' />";
    

     

    <?php
    function is_homepage()
    {
      return in_array(basename($_SERVER['REQUEST_URI']), array('', 'index.php', 'index.html', '/'));
    }
    $banner = substr($_SERVER['REQUEST_URI'], 1, (strlen($_SERVER['REQUEST_URI']))-3).'jpg';
    
    $flash= '<script type="text/javascript">
    	var params = {
    		 wmode: "transparent"
    	};
    	swfobject.embedSWF("_flash/banner.swf", "fpBanner", "620", "250", "9.0.0", "expressInstall.swf");
    	</script>';
    if (is_homepage()) {
    echo $flash;
    }
    
    else {
    
    echo "<img src='../graphics/$banner' />";
    }
    
    ?>
    
    

     

     

    and this is on my page include...

    <?php print is_homepage($banner) ?>
    

  6. this look better?

     

    <?php
    function is_homepage()
    {
      return in_array(basename($_SERVER['REQUEST_URI']), array('', 'index.php', 'index.html', '/'));
    }
    $banner = substr($_SERVER['REQUEST_URI'], 1, (strlen($_SERVER['REQUEST_URI']))-3).'jpg';
    
    $flash= '<script type="text/javascript">
    	var params = {
    		 wmode: "transparent"
    	};
    	swfobject.embedSWF("_flash/banner_lecdg.swf", "fpBanner", "950", "300", "9.0.0", "expressInstall.swf");
    	</script>';
    if (is_homepage()) {
    echo $flash;
    }
    
    else {
    
    echo "<img src=\"$banner\" />";
    }
    ?>
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.