Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

Posts posted by jstern

  1. Eddie,


    The only image I have is the 'idea exchange' icon. You've made reference to my 'triangle image' that I don't have. Do i need to get my design team to supply me with one to use your recommendation, I was hoping to make the dotted borders using only css, if that was possible.


    I do have the design team making me transparent image of the popup and the rounded corner border as well in case i want / need to use it

  2. I have create a hover popup on a new feature I'm implementing, and I'm not to sure if what i'm looking to do is possible or not.


    Ive seen some similar examples on Google, but all of them use large border widths to create triangles and polygon shapes using css.. i believe I this will not work with what i need to create since i want to fill and a dotted pink (#FEF1F2) border.


    I have attached an example of the spec I'll be creating, if anyone has an idea of how to make the oddly shaped popup bubble, could you please help me out. (I think I'm going to be asking the design team for an image, but I'd like to try it do it in just css if possible?).


    Im not very good with css, only the basics really so in any examples please explain as best you can so i can try to understand this. Thanks!post-28805-062556600 1328115041_thumb.png

  3. I noticed a problem on your lines:


    $stefan = new person();

    $jimmy = new person;


    should be:

    $jimmy = new person();


    ...but I don't see why this would make it work on windows and not linux, the only differences / annoyances I come across between O/S coding is case capitalization's.


    Ubuntu server giving you any specific errors?

  4. try wrapping it in a span tag?



    <p>You can download a joining form <span class = "span_underline"><a class="here" href="../text/joining.doc">here</a></span>.</p>




    .span_underline {

    text-decoration: underline;





    or a better solution, dont add span class at all and "text-decoration: underline;" to your .here class in the css file

  5. I see the link at the bottom of the forum "Community Forum Software by IP.Board 3.1.1" and as far as I can tell, they charge a monthly fee to download / use this forum?


    I really like this board and was hoping to download a version of it to use on a personal site, but I'm not in the market to pay for a message board. Should i continue a search for freeware PHP forums, or did I misinterpret that website?

  6. One other thing i noticed that might be causing you a problem is your bind_param() might be throwing "ERROR: Could not prepare SQL statement.""


    try changing :


    $stmt->bind_param("ss", $clientname, $address, $city, $telephoneno, $mobileno, $email, $sno);




    $stmt->bind_param("sssssss", $clientname, $address, $city, $telephoneno, $mobileno, $email, $sno);

    as I believe you have to specify the type of each value (though i might be wrong, I dont use bind_param() very often, i hope someone corrects me on this if i am incorrect See more info @ "http://php.net/manual/en/mysqli-stmt.bind-param.php" )

  7. if your seeing "'ERROR: Please fill in all required fields!'" error after trying to edit i think this is a problem:


    if ($clientname == '' || $address == '' || $city == '' || $telephoneno == '' || $mobileno == '' || $email == '' || $sno)
    $error = 'ERROR: Please fill in all required fields!';
    renderForm($clientname, $address, $city, $telephoneno, $mobileno, $email, $sno, $error, $userid );


    change the first line to read:

    if ($clientname == '' || $address == '' || $city == '' || $telephoneno == '' || $mobileno == '' || $email == '' || $sno =='')


    $sno was being treated as ' if true/set, then throw the error' im not sure if that is what you were expecting? (same thing when adding new record as well..)

  8. do you need to set this rowset to an array? I used to do this a lot when I was learning, just because i knew arrays better than objects, but if you dont need to, I would remove the ->toArray() when your returning.


    When you use fetchAll() your setting yourself up to retrieve more than 1 row if the condition are met. If more than one is returned this example could produce unexpected results;


    As an Array():


    (not sure what you've assigned getUser() to, but lets say its $rows)


    $rows = $this>getUser($username, $password);
    $uname = $rows['username']; //replace 'username' with the name of your database column.
    $role = $rows['role']; //replace 'role' with whatever the column name is to get the value. 
    //your array contains the databse column names as the array keys and the values as your array values.  Play with var_dump($rows); and refresh to see everything contained.


    As an object / rowset (omitting the toArray();)


    $rows = $this>getUser($username, $password);
    $uname = $rows->username;//replace 'username' with the name of your database column.
    $role = $rows->role; //replace 'role' with whatever the column name is to get the value. 
    //leaving as a rowset you keep yourself open to doing other functions to your results, whereas as an array, you are more limited.



    Like I said, if your $rows has more than one result brought from the SQL query this wont work, since each result will be in its own array (multi-dimensional array). use fetchRow() instead of fetchAll() when selecting if you only want / expect one result.

  9. I might be confused with what your looking for, but you'll want to extend "Zend_Db_Table_Abstract" in your Models if your using Zend


    class Jobseeker extends Zend_Db_Table_Abstract
    //i create constants for my column names so if one is ever renamed, i can quickly rename every query with one change
    const COL_ID = 'id';
    const COL_JOBSEEKERNAME = jobseekername;
    protected $_name = 'jobseeker'; // declare your table as is in your database
    protected $_dependentTables = array(); //add your dependent tables to access to to them through this object / rowset
    protected $_referenceMap = array(); //add your refernce map  Best to checkout Zend's documentation for what this and dependent Tables can do for you.
    public function retrieveAll() {
    [indent]return $this->fetchAll($this->select());[/indent]
    public function retrieveOne($condition) { //in my example condition must be a int / product id to return anything
    [indent]return $this->fetchRow($this->select()
    ->where(self::COL_ID = ?, $condition));[/indent]

    Hope this helps?

  10. realized after i had some lunch that my post might have confused you since i used Zend_Registry examples


    Zend_Registry and Zend_Session_Namespace are different obviously. If you must use sessions then below are some examples as well.


    start or call your session

    $session = new Zend_Session_Namespace($name);


    add something to your session

    $session->index = $value;


    call that value somewhere else in your code

    $session = new Zend_Session_Namespace($name);
    //make sure its set
    //set it
    } else {
    //do what ya need to with its value


    Registry will be cleared with every new Bootstrap request, thus you'd need to ensure your values are setup to load into it with every request, so it may not be useful with whatever you are planning to do. I tend to use them more often than Zend_Session_Namespace however.

  11. Set into Registry:

    Zend_Registry::set($index, $value);


    to retrieve that you've store:

    $session = Zend_Registry::get($index);

    //value is now stored into $session


    you can even store / pass an object and work on it if you have to:

    $session = Zend_Registry::get($index)->objectMethod();


    Usually a good idea to check if your registry entry exists before tryig to access:

    if (Zend_Registry::isRegistered($index)) {

  12. In my job I am constantly taking excel sheets full of data, parsing the information and inserting into database tables.


    I operate in the Zend Framework (PHP), with MySql databases, so Im not sure if my example is much help.


    first make script that allows you to upload your excel file. html looks something like:


    <form enctype="multipart/form-data" action="" method="post">
       <input type="hidden" name="MAX_FILE_SIZE" value="" />
       <label for="file">Upload your file:</label>
       <input type="file" name="file" id="file" /><br/>
       <button id="btn">Upload</button>


    Then Create a PHP a script that takes this file and reads though each line (each column per row)


    if ($this->getRequest()->isPost()) {
    //this is where a Zend plug helps me out, but PHP will offer similar librarys for accepting files
    $upload = new Zend_File_Transfer_Adapter_Http();
    $upload->addValidator('Extension', false, 'xls');
    $path = $upload->getFileName();
    $excel = PHPExcel_IOFactory::load($path); //now excel contains my spreadhseet info
    $infoArray = array();
    while (true) {
        $row = 1; //set the row number to start on
        $value = $excel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue(); //gets the value of row
        if ($value == null) {
            break; //exit from loop if were at the end of the file
        $infoArray[$row] = array(
              'column1' => $excel->getActiveSheet()->getCellByColumnAndRow(0, $row)->getValue()
              'column2' => $excel->getActiveSheet()->getCellByColumnAndRow(1, $row)->getValue()
              'column3' => $excel->getActiveSheet()->getCellByColumnAndRow(2, $row)->getValue()
       //now you should have an array filled with values that were in the spreadsheet, insert them into your database and you normally would
      // ex. foreach ($infoArray as $row) { //insert array data into DB }
    } else {
      echo $this->view->render('script/updatestationery.phtml'); //again this is probably more zend specific, the way it renders the view script


    I apologize if i missed anything in my example, i didnt want to copy / paste an actual example as my code is company owned, and it's also much larger and doing a lot of different things that I have omitted.


    Hope this helps get you started, message me if you'd like any further info or assistance with this project

  13. As with another persons post, i have a hard time reading through this to know exactly what everythings doing, however it seems as though in inventory_edit.php you have not defined $product_list anywhere.


    in inventory_list.php you have, but inventory_edit is seperate and cannot access that variable's contents, thus making undefined. (unless im missing an include() somewhere in inventory_edit where you've brought this info over from inventory_list??)



    I suggest making this whole block of code, it's own public function that you can use to retrieve your list:


    function getProductList() {
    //This block grabs the whole list for viewing
    $product_list = "";
    $sql = mysql_query("SELECT * FROM products");
    $productCount = mysql_num_rows($sql);//count the the output ammount
    if ($productCount > 0){
    while($row = mysql_fetch_array($sql)){
    $id = $row["id"];
    $price = $row["price"];
    $product_name = $row["product_name"];
    $date_added = strftime("%b %d, %Y", strtotime($row["date_Added"])); // Notice here how we changed it from _added to _Added
    $product_list .= "$id - $product_name -  £$price -  $date_added    <a href='inventory_edit.phppid=$id'>edit</a>••<a href='inventory_list.php?deleteid=$id'>  delete</a><br/>";
    $product_list = "You have no products listed in your store Yet";
    return $product_list;



    then in inventory_edit call the function:


    <h2>Inventory List</h2>
    <?php echo getProductList(); ?>


    and call the function the same way in inventory_list as well to clean things up.



    Summed up, it appears inventory list has the variable declared, but inventory_edit does not. Hope this helps.

  14. I have a hard time sifting through this, so I'll recommend trying to use the var_dump($value) function for your variables to track when / if the totals your expecting are ever getting set.


    Working backwards is usually where I start, so before your echoing out the variable is a good start. If its 0 there, use var_dump($value) in the function that does any work and passes it along until you've couldnt the culprit.


    I believe its un-related but there's a weird function that doesnt get used as far as I can tell:


    public function GetSsalesTax()
    $salesTax = .07;
    $subTotal=GetItemQuantity * $salesTax;
    return $subTotal;


    probably wanted that to look like:


    public function GetSsalesTax()
    $salesTax = .07;
    $subTotal=$this->GetItemQuantity($product_id) * $salesTax;
    return $subTotal;


    if this function gets used. (which i doubt since theres a GetSalesTax just below that that your probably using instead.


    You might want to follow proper function naming conventions as well to make your code a little more readable / professional.


    some are named 'emptyCart' (lowercase start, uppercaseadditional wording) which is more widely accepted / used. Others start with captial. Again, a non-issue, but good practice.

  • Create New...