• Member Avatar for cereal
    cereal

    Replied To a Post in PHP/MySQL login error

    Hi, You are not executing the query: $rows = "SELECT * FROM admin WHERE username = '$username'"; Where is the `execute()`? Besides, the IF statement will fail because the `crypt()` …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Issue with MySQL / PHP - Can't connect to local MySQL server through socket

    **@rookhaven** you can use special characters, but you have to escape, for example instead of: mysql -uroot -pabc!def do: mysql -uroot -pabc\!def and it will work, bye!
  • Member Avatar for cereal
    cereal

    Replied To a Post in Deleting Models not working in Laravel 5.2 Framework

    Hi, if you haven't found a solution, could you show the Product model and the table definition?
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to install and use pyinstaller in Kali linux

    Hi, you should not need the win32 version, just download the archive to a specific path, for example `~/sources/`, extract and create a link to `/usr/bin/` so that the script …
  • Member Avatar for cereal
    cereal

    Gave Reputation to gentlemedia in A Simple HTML Login page using JavaScript

    OMG... can someone please kill this thread??? :)
  • Member Avatar for cereal
    cereal

    Replied To a Post in Forloop multidimensional array result in email

    If you're using PHP 5.5+ then you could use `array_column` with `implode()`, for example: <?php // example contents $_POST['data'][] = ['a' => 1]; $_POST['data'][] = ['a' => 2]; $_POST['data'][] = …
  • Member Avatar for cereal
    cereal

    Gave Reputation to ryantroop in Correct way to do this?

    I also question the need for making a file for each email sent, especially by name of the sender.. If you have database access, you should probably use it. You …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Correct way to do this?

    Hi, you could use the [Nowdoc syntax](http://php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc), I prefer it because the code is more readable, but it's your choice, an example: <?php $id = rand(1,1000); $name = 'MissMolly'; $email …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Parse error: syntax error, unexpected

    Hi, look here `user_id = '".$_SESSION['userid']."' ")"` remove the second-last quote, so that changes to: `)"`. Then it should work, but consider that an **INSERT** query does not support the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Strange stuff found in production code

    > It doesn't look like JSON or anything. It looks like byte codes or something. (I DID NOT WRITE THIS APPLICATION) So, you have decoded the base64 string and you're …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Notice: Undefined index: cid in C:\xampp\htdocs\forum-tutorial\addreply.php

    Hi, the error is telling you the index key `cid` does not exists in the `$_GET` array. So, are you submitting the `cid` attribute through the form or through the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Mail output in HTML table format

    Ok, at line 16 and 17 you are declaring a variable but then using another one: $mContent = ''; echo $mcontent .= so, set `$mcontent = '';` or reverse and …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Mail output in HTML table format

    So, you get the email but not the query contents, correct? Is the `$conn` resource set in the included **config.php** file?
  • Member Avatar for cereal
    cereal

    Replied To a Post in cant delete account after clicking delete

    So how does look the real query? The one posted in your previous post does not match, it seems you are using: $delete = "DELETE FROM `users` WHERE `user_id`='$_GET['user_id']'"; And …
  • Member Avatar for cereal
    cereal

    Gave Reputation to ddanbe in star shape

    In which programming language? [This one?](https://en.wikipedia.org/wiki/Brainfuck)
  • Member Avatar for cereal
    cereal

    Replied To a Post in cant delete account after clicking delete

    Hi, at line 9 do: mysqli_query($MySQLi_CON, $delete) or die(mysqli_error($MySQLi_CON)); You should get the error returned from the database server.
  • Member Avatar for cereal
    cereal

    Replied To a Post in A couple of basic PHP questions

    > The reason " " are in the place they are is to define $_POST[text]...and the reason it defines text is because "text" is in the [] brackets of post...If …
  • Member Avatar for cereal
    cereal

    Replied To a Post in A couple of basic PHP questions

    Hi, about this: $clean["text"]=str_replace("malicious", " ", $_POST[text]); In all cases these quotes are used to define a string, in: $clean["text"] You are defining an index key on an array defined …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Warning: mysqli_result::fetch_array() expects parameter 1 to be integer, st

    Hi, look at the manual: http://php.net/manual/en/mysqli-result.fetch-array.php The argument must be a constant, in your case `MYSQL_ASSOC` without the quotes, the constant in this case is an integer and his value …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Laravel update

    Sure is `$key` and not `$primaryKey`? protected $primaryKey = 'user_id'; Model source: * https://github.com/laravel/framework/blob/06182c2b498cfc1bbb82e5d49bad0c92d256a337/src/Illuminate/Database/Eloquent/Model.php#L56
  • Member Avatar for cereal
    cereal

    Replied To a Post in starting mongodb

    You can run netstat with these options: sudo netstat -tulpn |grep -E ':[0-9]{5}' Or simply search for a specific port number: sudo netstat -tulpn |grep :28017 It should return something …
  • Member Avatar for cereal
    cereal

    Replied To a Post in New line not detected on codemirror preview?

    Hi, you could set the line separator into `getValue()`, for example at line `28`: editor.getValue('<br>') But this will add the `<br>` also in the code blocks, otherwise you can apply …
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in At the end of the month start new table

    However, you may want a different method - grouping via column: $sql = "SELECT CONCAT_WS('-',MONTH(`Date`),YEAR(`Date`)) AS mnthyr, `ticket_id`, `Uplata`, `Dobivka`, `Date` FROM `kladilnica` WHERE `Username`= ? ORDER BY `Date`" $stmt …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to count valid clicks for an ad?

    > Can someone change their IP address repeatedly in a short time, say less than a minute or five? Yes, if IP is dynamic you disconnect & connect to get …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Where to find programming challenges?

    Hi, you can try **HackerRank:** https://www.hackerrank.com/ Once logged, you can choose the domain you want to explore, some are language specific, but there are many challenges that can be answered …
  • Member Avatar for cereal
    cereal

    Replied To a Post in You have an error in your SQL syntax; check the manual that corresponds to

    The problem is generated in the `IN()` statement: what happens if `$topuid` is empty, like in your code? $topuid = array(); $idtopuid = implode(',', $topuid); The result of `$idtopuid` will …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Not working : Send POST Data with Ajax to a Symfony2 Controller

    Sorry, but it seems the attachment is not showing on your post. Once uploaded, in case of images, you have to choose how to display the attachment. Retry or, if …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Not working : Send POST Data with Ajax to a Symfony2 Controller

    > but it is showing red link in the console with no error message or status. If you meant Google Chrome Console then can you check if there is any …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Validating and submitting form field php

    > Reading through the php manual, it appears that when I use the filter_input method I shouldn't put the first parameter (type) in quotes My fault, sorry, I wrote it …
  • Member Avatar for cereal
    cereal

    Gave Reputation to Violet_82 in Validating and submitting form field php

    Right, I think I might have found the problem. Reading through the php manual, it appears that when I use the filter_input method I shouldn't put the first parameter (type) …
  • Member Avatar for cereal
    cereal

    Replied To a Post in laravel redirect back with variables

    Hi, I'm not sure I've understood your request and I haven't used L4 in a while, but: with('message','Message has been sent',compact('account','pageTitle')) Should not work, as the `with()` method accepts only …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Validating and submitting form field php

    > how do I fix that? Define the allowed request method and sanitize the input, as in my previous example, that should limit improper submissions. > Nope, I didn't get …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Validating and submitting form field php

    Keep in mind that your server side script is not safe: an attacker could send a request directly to the **formhandler.php** script and this will execute without control. Also the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Need help to insert multidirectional array in MySQL with php

    By the way: you can use `$deck = range(1, 52);` to get the numbers array, each entry will be an integer.
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP uploading files

    The specific error raises because the index key does not exists in the array, example: $data['a'] = 'hello'; print $data['a']; # will print 'hello' print $data['b']; # will raise the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Registration form in Codeignitor with image upload and validation

    Hi, CodeIgniter 2.* is in legacy mode and reached end-of-life on October 31, 2015. It means they are not going to support it anymore. It's there for projects already developed …
  • Member Avatar for cereal
    cereal

    Gave Reputation to lewashby in Trying to understand the POST form variable

    I wasn't getting an error or anything it's jut that I noticed that my POST variables appeared in the URL, `.com?var=x&var=y` What do you mean that my HTML MUST have …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Trying to understand the POST form variable

    > What do you mean that my HTML MUST have a <head> tag? ... It seems I'm still learning the basics. You're right, it's not required, what is required is …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Trying to understand the POST form variable

    The form works fine for me, it executes a POST request and the parameters are sent as request body, not in the GET segment. I cannot execute the code of …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PDO query is not inserting into dtabase?

    Maybe your IDE was tricked by the string concatenation, I don't know, what are you using? You should add the PDO error methods to catch the errors. Anyway, you can …
  • Member Avatar for cereal
    cereal

    Began Watching Fill Values in multidimensional Array (PHP)

    I've got a small problem. I'm working on a little package/product-list. If you're watching a Package, my website should show you which products are in there. If a product is …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Trying to understand the POST form variable

    Can you show your form code? Anyway you can setup a simple echo script (echo.php) and see what really happens when a request is sent. You need to open two …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PDO query is not inserting into dtabase?

    Ok, now I see there is an error on line 23 of your first post, you're missing the closing `VALUES()` parenthesis: ":rate,:discount"); It should be: ":rate,:discount)");
  • Member Avatar for cereal
    cereal

    Replied To a Post in Happy new year 2016

    Happy New Year! ^__^
  • Member Avatar for cereal
    cereal

    Replied To a Post in PDO query is not inserting into dtabase?

    **@shany** Hi, consider that MySQL **will not** return the last inserted id if: * the table does not have a column with the `auto_increment` attribute * or if you manually …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Flexible simple File Manager PHP (for CodeIgniter)

    Hi, check the **Hoa Project**: * http://hoa-project.net/En/ In particular: * https://github.com/hoaproject/File You can embed this code by using composer, which is supported by the latest version of CodeIgniter.
  • Member Avatar for cereal
    cereal

    Replied To a Post in time difference calculation

    You have to format the date string to something that `Date()` can handle, follow: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
  • Member Avatar for cereal
    cereal

    Replied To a Post in Things that you should be careful while upgrading to PHP 7

    Memcached is not available, it is in Ondřej ppa, but still not official: * https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0
  • Member Avatar for cereal
    cereal

    Replied To a Post in Codigniter Dynamic category view

    I'm not sure I've understood your request, if you want to know how to append segments to a link and make it work with a specific logic, then you can …

The End.