• Member Avatar for cereal
    cereal

    Replied To a Post in Linux ubuntu ssh command

    Try `sudo su` then enter your password, as requested, it should log you as root. Also read this: https://help.ubuntu.com/community/RootSudo
  • Member Avatar for cereal
    cereal

    Replied To a Post in Suggestions for PHP or JavaScript graphing libraries

    Hi, you can check the **D3.js** project: * http://d3js.org/ * https://github.com/mbostock/d3/wiki/Tutorials And the **Charts.js** project: * http://www.chartjs.org/
  • Member Avatar for cereal
    cereal

    Replied To a Post in Vacation

    Have a nice time!
  • Member Avatar for cereal
    cereal

    Replied To a Post in my facebook site cant logo out

    Hi Ed, so in local it logs out successfully and, instead, it does not work in production? No error codes? Have you changed the information to reflect the production URL …
  • Member Avatar for cereal
    cereal

    Gave Reputation to paulkd in php array string issue

    Hi James, $response[] = will create (if it doesn't exist) or append the right-hand value to the $response array. So if $html->data->identifier is a simple string, e.g. 'Price', then a …
  • Member Avatar for cereal
    cereal

    Gave Reputation to James_43 in php array string issue

    Here is the result I get: Array ( [0] => stdClass Object ( [374] => ) )
  • Member Avatar for cereal
    cereal

    Gave Reputation to invisal in php array string issue

    Let focus on this line and its error message $response[] = array('quantity' => $itemsinfo['qty']); // [] operator cannot be applied to string First of all, there are two [] in …
  • Member Avatar for cereal
    cereal

    Gave Reputation to James_43 in php array string issue

    Here is the result I get: Array ( [0] => stdClass Object ( [374] => ) )
  • Member Avatar for cereal
    cereal

    Gave Reputation to invisal in php array string issue

    Let focus on this line and its error message $response[] = array('quantity' => $itemsinfo['qty']); // [] operator cannot be applied to string First of all, there are two [] in …
  • Member Avatar for cereal
    cereal

    Replied To a Post in display all dates with day in between two dates

    > Each view in what really the questioner think and asking might take away that fog True, but I thought in this case we needed more straight answers. Anyway, I …
  • Member Avatar for cereal
    cereal

    Replied To a Post in display all dates with day in between two dates

    --- EDIT --- never mind, jkon's questions are more pertinent to solve this.
  • Member Avatar for cereal
    cereal

    Began Watching SSL Certificate

    I was wondering if it's really necessary to have an SSL certificate and therefore https for a webshop (WordPress & WooCommerce) where payments will only be handled via external payment …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP PDO SUM a column value

    Try to remove the WHERE condition, just to see if the query returns something and what is assigned to `:targetID`: $f15 = "SELECT sum(cost), :targetID as 'target' FROM ingredients"; And …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Blank Page on Submit

    As test, try to replace line 63 (the insert query) with: if( ! mysqli_query($dbc, "INSERT INTO ...")) { printf("Errormessage: %s\n", mysqli_error($dbc)); } If the problem is related to the insert …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Blank Page on Submit

    > error is still present... and the error is?
  • Member Avatar for cereal
    cereal

    Replied To a Post in Blank Page on Submit

    Hi, the insert query is missing the `VALUES` closing parenthesis: ... ADDDATE(NOW(), INTERVAL 1 MONTH)) When in doubt add `mysqli_error()`: * http://php.net/manual/en/mysqli.error.php Bye!
  • Member Avatar for cereal
    cereal

    Began Watching Duplication Check

    I am in the process of developing a web application with a "question - answer" session in PHP and MySQL. This is more like a forum, where the user asks …
  • Member Avatar for cereal
    cereal

    Replied To a Post in how-to-display-the-membership-expiration-date

    To extend the query to all users just remove the **name** condition from the **WHERE** clause: SELECT * FROM `user` WHERE `expires_at` < DATE_ADD(NOW(), INTERVAL 15 DAY); and it should …
  • Member Avatar for cereal
    cereal

    Gave Reputation to Dani in forum area tags in my profile

    OK great! :)
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in forum area tags in my profile

    Yes was cached. Thanks. Tags more relevant now. :)
  • Member Avatar for cereal
    cereal

    Gave Reputation to invisal in Allow user to resize the height of the editor

    ![Capture2.PNG](/attachments/large/0/c09f3b7c471edee656addd0431ecc01b.PNG "align-center") It would be nice to allow user to resize the height of the editor. It is terrible experience to write a long post with current editor height.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Nginx Config help!

    If you don't have access to those commands then you may have to ask to your hosting helpdesk. You can also test the syntax of your configuration files: nginx -t …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Nginx Config help!

    Hi, what you got from: > See systemctl status nginx.service and journalctl -xe for details
  • Member Avatar for cereal
    cereal

    Replied To a Post in change file format

    > I see that php presentation and word has bug. May I ask you a question if there is some other way that i can view my office document file …
  • Member Avatar for cereal
    cereal

    Replied To a Post in change file format

    > Do i still need PhpPresentation-develop.zip that i have downloaded? No, you should use the **master** version as this is usually the stable version. The **develop** version introduce some new …
  • Member Avatar for cereal
    cereal

    Replied To a Post in change file format

    You have to require the autoload script. But I see that also the [Common](https://github.com/PHPOffice/Common) library is needed. The easiest way to install this package is through [composer](https://getcomposer.org/). Can you use …
  • Member Avatar for cereal
    cereal

    Replied To a Post in change file format

    No, the namespace does not reflect a path into the filesystem. It's used to: > provide a way in which to group related classes, interfaces, functions and constants. Check the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in change file format

    For excel or doc files refer to the other PHPOffice projects: * https://github.com/PHPOffice The code would be similar, where instead of calling PhpPresentation you would load PhpWord or PhpExcel. In …
  • Member Avatar for cereal
    cereal

    Replied To a Post in change file format

    No, not through `copy()`, that will change only the extension. You can try PHPOffice/PHPPresentation: * https://github.com/PHPOffice/PHPPresentation For example: $filename = '/path/to/file.pptx'; $new_name = '/destination/path/file.odp'; $phpPPTX = \PhpOffice\PhpPresentation\IOFactory::load($filename); $odpWriter = \PhpOffice\PhpPresentation\IOFactory::createWriter($phpPPTX, …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Multiple checkbox options

    it happens... lol :D
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to deny direct download from website

    Ok with Microsoft-IIS/8.0 you can try to add a rewrite rule to your **web.config** file: <rule name="Prevent image hotlinking"> <match url=".*\.(gif|jpg|png)$"/> <conditions> <add input="{HTTP_REFERER}" pattern="^$" negate="true" /> <add input="{HTTP_REFERER}" pattern="^http://site\.tld/.*$" …
  • Member Avatar for cereal
    cereal

    Replied To a Post in retrieve only one row from mysql statement

    Maybe these are affected by other CSS rules. What happens if you isolate this portion and apply only his own rules?
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to deny direct download from website

    Hi, I have few questions: 1. in your tags there are PHP and database: how these are involved in this issue? 2. The static files are served directly or by …
  • Member Avatar for cereal
    cereal

    Replied To a Post in retrieve only one row from mysql statement

    > Thats exactly what i am trying to void i dont want to loop <span>abc</span><span>def</span><span>ghi</span> the one under the other but in the same line. To put them inline use …
  • Member Avatar for cereal
    cereal

    Replied To a Post in retrieve only one row from mysql statement

    The `loop` attribute works fine for me with this test: <marquee behavior="scroll" loop="2" scrollamount="4" direction="left" width="100px" height="170px"> <span>abc</span> <span>def</span> <span>ghi</span> </marquee> Live example: http://jsfiddle.net/8uqatjed/ But consider that the `marquee` tag …
  • Member Avatar for cereal
    cereal

    Replied To a Post in retrieve only one row from mysql statement

    Do you need that row in the following loop? If not then do: $uid = mysqli_fetch_row($query, MYSQLI_ASSOC); echo $uid[0]['a_uid']; while($row = mysqli_fetch_assoc($query)) # and so on The loop will start …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHPMailer Bug

    **@davidbcn** Hi, open your own thread to get responses.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Multiple checkbox options

    Use `var_dump($val);` instead of `echo $val;` to see what is returned. If the form ends like this (with a `</form>`) and there aren't other input fields, then it should work …
  • Member Avatar for cereal
    cereal

    Replied To a Post in how-to-display-the-membership-expiration-date

    It depends: do you want to lock out the user from his profile or allow him to enter and display a message that invites him to renew the membership? Above …
  • Member Avatar for cereal
    cereal

    Replied To a Post in how-to-display-the-membership-expiration-date

    Hi, you can do this in the select query, something like: SELECT * FROM `user` WHERE `username` = ? AND `expires_at` < NOW() The expression `expires_at < NOW()` will verify …
  • Member Avatar for cereal
    cereal

    Replied To a Post in breaking between php & html

    You have to set quotes around the value you want to search, otherwise `COURT` will be interpreted as a column name. So: $sql = "SELECT full_name, tdoc_number, race, facility FROM …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP reading CSV problem

    Look at the array through `var_dump()`, it may add some information about that index.
  • Member Avatar for cereal
    cereal

    Replied To a Post in breaking between php & html

    The number sign `#` acts like a comment in MySQL, in your case it will affect the query by returning all the rows instead of selecting by id. But this …
  • Member Avatar for cereal
    cereal

    Replied To a Post in breaking between php & html

    Sure is not `$connection->query($sql)` with `->` instead of `-`? It seems you're calling a method, or an anonymous function, I think the former. In the latter case, then in PHP …
  • Member Avatar for cereal
    cereal

    Replied To a Post in validation error?

    Hi, the `set_rules()` method requires three arguments: * field name * label * rules See documentation at: * https://codeigniter.com/user_guide/libraries/form_validation.html#CI_Form_validation::set_rules So your rules would look like: $this->form_validation->set_rules('email', 'email', 'required|valid_email'); $this->form_validation->set_rules('password', 'password','required');
  • Member Avatar for cereal
    cereal

    Replied To a Post in G++ configuration

    Hi, from what I've understood you have only to set the path of the libraries, follow the instructions in this tutorial and it should work fine: * http://www.sfml-dev.org/tutorials/2.3/start-linux.php
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP Memory spill

    Hi, the undefined offset is probably given by: $rawData[$i + $backdate] Check if the index key exists: $key = $i + $backdate; if(array_key_exists($key, $rawData)) $pTimeseries[$i][1] = $rawData[$key][0];
  • Member Avatar for cereal
    cereal

    Gave Reputation to jkon in Why daniweb attracts only newbies with no interest to stay in programming

    One more could be the ability to make short comments into a response (but not as short as the “upvote” comment) without the need to vote. One other would be …
  • Member Avatar for cereal
    cereal

    Replied To a Post in how to convert mysql to mysqli query

    Hi, use **prepared statements**, start from here: * http://php.net/manual/en/mysqli.prepare.php * http://php.net/manual/en/mysqli.quickstart.prepared-statements.php Look at the first example in the first link, I'm not converting the code directly for you, because it's …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Why daniweb attracts only newbies with no interest to stay in programming

    I think skilled programmers usually don't have problems with basic / general language issues and, when having some difficulties, they would search for help in appropriate places, like: bug lists, …

The End.