Jump to content

fugix

Members
  • Posts

    1,483
  • Joined

  • Last visited

Posts posted by fugix

  1. I'll be nice and post the code since the OP didnt

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Untitled Document</title> 
    <link href="styles/styles.css" rel="stylesheet" type="text/css" /> 
    </head> 
    
    <body> 
    <div id="Container"> 
    <img src="images/header.gif" width="1000" height="191" alt="Reptile Care Guide" /> 
    <ul id="NavBar"> 
    
    <li> 
      <div class="tab"> 
        <div class="rollover-tab-div1"></div> 
        <div class="rollover-tab-div2"><a style="margin-top:15px" href="index.html" title="Reptile Care Guide - Homepage">Home</a></div> 
        <div class="rollover-tab-div3"></div>  
      </div> 
    </li> 
    
    
    
    
    <li>  <div class="tab"> 
        <div class="rollover-tab-div1"></div> 
        <div class="rollover-tab-div2"><a  href="bearded-dragon.html" title="Reptile Care Guide - Bearded Dragon">Bearded Dragon</a></div> 
        <div class="rollover-tab-div3"></div>  
      </div></li> 
    <li>  <div class="tab"> 
        <div class="rollover-tab-div1"></div> 
        <div class="rollover-tab-div2"><a href="corn-snake.html" title="Reptile Care Guide - Corn Snake">Corn Snake</a></div> 
        <div class="rollover-tab-div3"></div>  
      </div></li> 
    <li>  <div class="tab"> 
        <div class="rollover-tab-div1"></div> 
        <div class="rollover-tab-div2"><a href="green-anole.html" title="Reptile Care Guide - Green Anole">Green Anole</a></div> 
        <div class="rollover-tab-div3"></div>  
      </div></li> 
    <li>  <div class="tab"> 
        <div class="rollover-tab-div1"></div> 
        <div class="rollover-tab-div2"><a href="leopard-gecko.html" title="Reptile Care Guide - Leopard Gecko">Leopard Gecko</a></div> 
        <div class="rollover-tab-div3"></div>  
      </div></li> 
    <li>  <div class="tab"> 
        <div class="rollover-tab-div1"></div> 
        <div class="rollover-tab-div2"><a href="blogs.html" title="Reptile Care Guide - Blogs">Blogs</a></div> 
        <div class="rollover-tab-div3"></div>  
      </div></li> 
    
    </ul> 
    
    
    <div id="TabBar"> 
    </div> 
    
    <div id="MainContent">Content for  id "MainContent" Goes Here</div> 
    
    </div> 
    </body> 
    </html> 

    @charset "utf-8";
    /* CSS Document */
    
    body {
    background-image: url(../images/bg-tile3.jpg);
    background-repeat: repeat;
    }
    #Container {
    background-color: #FFF;
    margin: 0 auto;
    width: 1000px;
    }
    #nav-bar {
    background-image: url(../images/nav-bar.gif);
    }
    #NavBar {
    background-image: url(../images/nav-bar.gif);
    height: 38px;
    width: 1000px;
    background-repeat: no-repeat;
    margin-top: 0.2em;
    padding: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    text-align: center;
    }
    #TabBar {
    background-image: url(../images/tab-bar.gif);
    height: 23px;
    width: 1000px;
    margin-top: 1px;
    }
    ul {
    margin: 0px;
    }
    #NavBar li {
    display: inline;
    float: left;
    margin-top: 3px;
    }
    
    .tab div {
    width: 10px;
    height: 36px;
    
    }
    .tab {
    
    }
    #Container #NavBar li .tab .rollover-tab-div1 {
    height: 36px;
    width: 10px;
    }
    #Container #NavBar li .tab .rollover-tab-div3 {
    height: 36px;
    width: 10px;
    }
    
    
    .tab:hover .rollover-tab-div1 {
    background-image: url(../images/rollover-menutab-1.1.gif);
    width: 10px;
    }
    
    .tab:hover .rollover-tab-div2{
    background-image: url(../images/rollover-menu-tab-1.2.gif);
    }
    
    .tab:hover .rollover-tab-div3 {
    background-image: url(../images/rollover-menu-tab-1.3.gif);
    }
    
    #NavBar li div div{
    float: left;
    width: auto;
    }
    
    
    
    
    #NavBar li a {
    text-decoration: none;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    color: #FFF;
    font-weight: bold;
    padding-right: 15px;
    padding-left: 15px;
    margin-top: 222px;
    padding-top: 5px;
    height: 36px;
    }
    
    
    
    .clear-float{
    clear:both;
    margin:0;
    padding:0;	
    }

     

  2. you can pass your variables into the function using the "global" statement, or the $GLOBALS array..i.e

    $results0to4 = array();
    function arrayPlacer($comment,$aveScore){
    global $results0to4;
      if($aveScore < 4 && !in_array($comment,$results0to4)){
        array_push($results0to4,$comment);
        return;
      }

    or

    $results0to4 = array();
    function arrayPlacer($comment,$aveScore){
    $results0to4 = $GLOBALS['results0to4'];
      if($aveScore < 4 && !in_array($comment,$results0to4)){
        array_push($results0to4,$comment);
        return;
      }

  3. just modify the code a bit.

    echo '<table cellpadding="2" cellspacing="2" border="0" align="center">
    <td width="20px" align="center" id="#">#</td>';
    foreach(range('A', 'Z') as $currLetter) {
    echo "<td width='20' align='center' id='$currLetter'";
    if($_GET['id'] == $currLetter) { echo '  style="background-color:#F0F;"'; }
    echo ">$currLetter</td>";
    }
    echo '</table>';

  4. What exactly do you mean "what is required?" the code you provide will work much the same as your first code, however the function addslashes() requires its parameter to be a string, not an array as you are trying to use.. Why exactly would you rather write it the second way? I personally would prefer the first way, much easier to distinguish between values

  5. your submit buttons need to have an attribute of type="submit" not "button" unless you are going to incorporate javascript with them, which it doesnt look like you are

     

    <input name="login" id='login_box' type="submit" value='Log In'/>
    <input name="login" id='login_box' type="submit" value='Register Now'/>

     

  6. what errors do you receive when adding this to your code?

    <?php
    $to='to@examplecom';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: from@example.com' . "\r\n" .
        'Reply-To: rply@example.com' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
    if(mail($to, $subject, $message, $headers))
    {
       echo "Mail sent Successfull";
    }
    else
    {
       echo "Mail function fail";
       echo $php_errormsg;
    }
    ?>
    

  7. i forgot to add the function that will actually use the pattern to grab the info path_info from your url..

    $pattern = '/^http\:\/\/www\.[a-zA-Z0-9]+?\.com\/([a-zA-Z-0-9]+?)/';
    $subject = 'http://www.example.com/Username';
    preg_match($pattern,$subject,$matches);
    echo $matches[0];

    where $matches[0] will contain your string data

×
×
  • 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.