Jump to content

cs.punk

Members
  • Posts

    437
  • Joined

  • Last visited

Posts posted by cs.punk

  1. Hey guys. Having some trouble getting Zend to work.

     

    I'm using XAMPP, created a sparkling new installation for it. Downloaded zend, extracted it to a directory, then copied the 'library' file into C:\xampp and zend\xampp\php\PEAR\ (this is my 'include path' within PHP).

     

    How ever using the the shell with XAMPP and typing in 'zf ' follow by any command gives me the following error:

     

    Warning: require_once(Zend/Tool/Framework/System/Provider/Config.php): failed to open stream: No such file or directory in C:\xampp and zend\xampp\php\PEAR\library\Zend\Tool\Framework\System\Manifest.php on line 26.

     

    And heres the line:

    require_once 'Zend/Tool/Framework/System/Provider/Config.php';
    

     

    Although this file exits.

     

    Any ideas?

  2. I didn't test anything but,

     

    The wooden background looks 'blurry' although it seems you were aiming for a grain effect. I would change it.

     

    Also the homepage isn't very well laid out in my opinion. No top logo/header. Missing something to 'box it' all in.

     

    Sorry if I went off topic. Hope it was helpfull

  3. You just echo out the variable, no need to add the <?php ?> tags. You only use those if perhaps you've had a closing tag before and your writing static HTML.

     

    while ($row = mysql_fetch_array($sql_result)) 
    {
    $id1 = $row["id"];
    $username1 = $row["username"];
    $password1 = $row["password"];
    $organisation1 = $row["organisation"];
    $delete = echo '<a href="delete.php<a href="delete.php?id=' . $row->id . '>Delete</a>">Delete</a>';
    
    print "<tr><td>$organisation1</td><td></td><td>$username1</td><td>$delete</td></tr>";

  4. An empty string should return false, however when assigned the value to an empty $_POST value it returns true (for some reason).

     

    You basically needed one function, empty() which returns true if it is indeed empty.

     

    So:

    if (empty($name))
    {echo "The username is empty";
    }
    

     

    You can also add ! before empty: !empty($name) which does the opposite (checks if it is NOT empty).

  5. I'm constantly hammering my head against some CSS.

     

    So, I offer you my PHP skills in return.

     

    I'm happy to skype/email/IM with anything you might have a problem with.

     

    Available anytime from 4:00pm - 21:00pm on weekdays and completely free on weekends (GMT)

     

    Cheers!

  6. Can anyone tell me why the floated input fields have a space after the first when I set the fieldset to 350px, yet at 400px it's ok?

     

    css

    label.login {
        color: #CCCCCC;
        font-size: 16px;
        padding-left: 20px;
        font-family: "DejaVu Sans", "Arial";
    }
    
    input.login {
        text-align: center;
        clear: right;
        float: right;
    }
    
    input.button {
        margin-top: 20px;
        margin-left: 20px;
    }
    
    fieldset.login {
        width: 400px;
        margin: 10px;
    }
    

     

            <fieldset class='login'>
                <form action='' method='post'>
                
                    <label class='login' for='user'>Username:</label>
                    <input class='login' name='user' id='user' type='text'/>
                    <br />
                    
                    <label class='login' for='password'>Password:</label>
                    <input class='login' name='password' id='password' type='text'/>
                    <br />
    
                    <label class='login' for='bob'>Bob:</label>
                    <input class='login' name='bob' id='bob' type='text'/>
                    <br />
                    
                    <input class='button' name='submit' value='Login' type='submit'/>
                </form>
            </fieldset>
    

     

    [attachment deleted by admin]

  7. Made something rough. Hope it helps.  :)

     

    <?php
    $maxId = 0;
    $id8Count
    
    foreach ($item as $items)
    {
    
        if ($item['id'] > $maxId)
        {
            if ($item['id'] == 
            {
                $id8Count++;
            }
            
            $maxId = $item['id'];
        }
    }
    
    if ($maxid == 4)
    {
        $price = "4.95";
    }
    elseif($maxId == 5)
    {
        $price = "6.00";
    }
    
    $price = $price + 15 * $id8Count;
    
    ?>
    

  8. Urggggh what am I doing wrong?

     

    <script type="text/javascript" src="js.js" />
    

     

    js.js just conatins alert("hello");

     

    When I don't include it, everythings fine, but as soon as I add that boom my page goes blank. I have tried DOM inspector in FireFox and it seems it's not getting anything from the body element...

     

    Thank you...

  9. Can anyone tell me if there is any difference between:

     

    function changeImgOn(picID, imgSrc)
        {
            var img = document.getElementById(picID);
            img.src = imgSrc;
        }
    

     

    or

     

    function changeImgOn(picID, imgSrc)
        {
            var img = document.getElementById(picID);
            img.setAttribute("src", imgSrc);
        }
    

     

    Where my HTML is:

     

        <img id='pic1' src='home_off.jpg'
            onmouseover='changeImgOn("pic1", "home_on.jpg")'
            onmouseout='changeImgOn("pic1", "home_off.jpg")'/>
    

     

    They both work but just wanted to know.

     

    Thank you!

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