• Member Avatar for cereal
    cereal

    Gave Reputation to md.Rayad in phonegap/cordova: $_files is empty in image upload

    Guys, Finally after 7 days i fixed the issue. Actually i was very stupid. You will laugh on me. The url i had given was http://sample.com/upload_img.php i just need to …
  • Member Avatar for cereal
    cereal

    Replied To a Post in phonegap/cordova: $_files is empty in image upload

    Hi, have you tried the **web developer console** integrated in your browser (Mozilla Firefox, Chrome, Chromium) to see if the javascript code is raising some errors? Can you provide a …
  • Member Avatar for cereal
    cereal

    Gave Reputation to pritaeas in Download File from Database using phph

    @cereal: I was typing something similar... ;)
  • Member Avatar for cereal
    cereal

    Replied To a Post in Download File from Database using phph

    **@zebnoon1** Hi, you were asked multiple times, to reply to some questions with useful information. Calmly read again Pritaeas posts and reply to his requests. For example, he asked: > …
  • Member Avatar for cereal
    cereal

    Replied To a Post in strict standard warning connecting to db in php

    Hi, change the **DB_IStatement_1** signature for the `execute()` and `fetch()` methods and it should work fine. In practice you are implementing the PDOStatement interface into your class, so you must …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Password Validation using HTML5

    Hi, we need more information about your issue: the code, what is expected to and what you get. If you can, add a JS fiddle, it would help.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Select Data from two mysql tables using one query not working properly

    Hello, you can use a stored procedure, for example: DROP PROCEDURE IF EXISTS `calcTotals`; DELIMITER // CREATE PROCEDURE `calcTotals`(IN `loanStatus` VARCHAR(100), IN `settlementStatus` VARCHAR(100)) BEGIN DECLARE `total_loan` DECIMAL(10,2); DECLARE `total_settlement` …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to Can i make this bookmarklet work on my other wordpress installation?

    Hi, see the lines `254` and `263` of the PHP page, the first checks if the token is set by the request (i.e. through javascript), the second is a conditional …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    Hi Simon, I think your issue is given by the configuration of your local Apache server. From what I have understood you are not configuring a **VirtualHost** for your project. …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Arrays are not showing on website - Phalcon Translation with volt template

    Hi, it seems you have `indexAction()` nested in the `_getTranslation()` method, fix the brackets and then see if it works.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Actual working method for checking integer

    Also: filter_var($not_an_int, FILTER_VALIDATE_INT); Returns **FALSE** when it's not an integer: http://ideone.com/O3wyIS
  • Member Avatar for cereal
    cereal

    Replied To a Post in Actual working method for checking integer

    Hi, you could use `filter_var()` with `FILTER_SANITIZE_NUMBER_INT`: filter_var($not_an_int, FILTER_SANITIZE_NUMBER_INT); filter_var($actual_int, FILTER_SANITIZE_NUMBER_INT); Will return string, that can be casted, se an example here: * http://ideone.com/J494Jp Docs: http://php.net/manual/en/filter.filters.sanitize.php
  • Member Avatar for cereal
    cereal

    Revoked Solved Status for Community related e-mail

    Hello, everytime I set the checkbox to get community related e-mails and update the profile, it seems to work and if it occurs an event I get the notification, but …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Age showing 0 in database

    /// edit Sorry D, just saw your post! ;D As you see, from the dump, **age** is not set in the POST request and there is nothing similar, a part …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Age showing 0 in database

    Hi, it seems fine. Are you sure `$_POST['age']` is set? Check the submit form or do a `var_dump($_POST);` to see what is really sent with the request, maybe is not …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP Notice: Use of undefined constant prepare_insert - assumed 'prepare_in

    To make it available in the scope of the function you must declare it as global: function test($id){ global $conn; /// then you can use it } Docs: http://php.net/manual/en/language.variables.scope.php
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP Notice: Use of undefined constant prepare_insert - assumed 'prepare_in

    The argument for `function_exists()` must be a string, so: if( ! function_exists(prepare_insert)) should be: if( ! function_exists('prepare_insert')) Docs: http://php.net/function-exists Bye!
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    To tell the truth, there is a space between [the **substitution** and the **flags**:](https://httpd.apache.org/docs/current/rewrite/intro.html#rewriterule) RewriteRule ^new/([0-9]+)/?$ new.php?msgID=$1 [R=301,L] ↑ ↑ ↑ space space space What you returned is without the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    Ok, my mistake :) I forgot to prepend the correct flag, it's `R=301`: RewriteRule ^new/([0-9]+)$ new.php?msgID=$1 [R=301,L] RewriteRule ^new/([0-9]+)/$ new.php?msgID=$1 [R=301,L] where `R` stands for Redirect: * https://httpd.apache.org/docs/current/rewrite/flags.html#flag_r
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    Ok and what is the error in the Apache error.log? It could be a loop, which could mean a missing rewrite condition, like: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Used …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Issues with Zend Composer command and loading map in middle of the article

    Hi, the composer command `development-enable` is part of the `zf-development-mode` tools which ships in version 3.0 and requires PHP 5.6 or PHP 7.0, you're using 5.4, so it won't be …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    So, if you do: /new/155/ With an ending slash it matches correctly? If the **new.php** file is in `localhost/` try these: RewriteRule ^project/new/([0-9]+)$ new.php?msgID=$1 [L,301] RewriteRule ^project/new/([0-9]+)/$ new.php?msgID=$1 [L,301] Otherwise, …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    > the thing is that i call the php fuction in a separate file that doesn't get the $_GET id `$_GET` is a superglobal variable, so it's available in all …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    Ok, so the `/155` segment should be the `msg_id`, correct? Can you show us the rewrite rules? Maybe you just need to point to another index, try to dump the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    What are you using to build those links? Mod rewrite or a router? (Slim perhaps?) If the rewrite rule defines `msg_id` then it will be accessible through that link, otherwise …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    The backtick is the operator used to define those objects known as identifiers: table names, columns, databases and to distinguish a column name, for example, from a reserved word. See: …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    Add backticks to `type`, as suggested by Pritaeas: SELECT `type` FROM ...
  • Member Avatar for cereal
    cereal

    Replied To a Post in Problem with Sql syntax when trying to get value from $_GET[]

    Hi! The method/function `fetchAll()` of the PDO library returns an array, which is an empty array if no rows are matched, what you want here is probably `fetchColumn()`: $type = …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Online PHP Debugger

    **@phpio** Hi, the source of `__FILE__` (and the other files in the same path) can still be read with this line: include "php://filter/convert.base64-encode/resource=index.php"; This is a variant of the **LFI** …
  • Member Avatar for cereal
    cereal

    Marked Solved Status for Community related e-mail

    Hello, everytime I set the checkbox to get community related e-mails and update the profile, it seems to work and if it occurs an event I get the notification, but …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Community related e-mail

    #### Update Dani it seems it was my Chromium browser, I checked the option through Mozilla Firefox and now (48h later) is still kept. I don't undertand the reason, as …
  • Member Avatar for cereal
    cereal

    Replied To a Post in mysqli_query error, I have problem submiting my form

    Hi, > Warning: mysqli_query() expects parameter 1 to be mysqli, null given means that `$connection` is `NULL`, you have to create the connection to the database. See: * http://php.net/manual/en/function.mysqli-connect.php
  • Member Avatar for cereal
    cereal

    Created [PHP] About environment variables

    ###Simple Advice This is just a reminder. When setting environment variables through **.htaccess**, **CLI** or **dotenv** use `filter_var()` to evaluate a boolean. For example, start the built-in PHP server with …
  • Member Avatar for cereal
    cereal

    Began Watching Please help me to export the data ,get from web crawler, to csv.

    import requests import pandas as pd import csv from bs4 import BeautifulSoup from pandas import Series,DataFrame import unicodecsv def name1(): url="https://www.agoda.com/zh-tw/pages/agoda/default/DestinationSearchResult.aspx? asq=%2bZePx52sg5H8gZw3pGCybdmU7lFjoXS%2baxz%2bUoF4%2bbAw3oLIKgWQqUpZ91GacaGdIGlJ%2bfxiotUg7cHef4W8WIrREFyK%2bHWl%2ftRKlV7J5kUcPb7NK6DnLacMaVs1qlGagsx8liTdosF5by%2fmvF3ZvJvZqOWnEqFCm0staf3OvDRiEYy%2bVBJyLXucnzzqZp%2fcBP3%2bKCFNOTA%2br9ARInL665pxj%2fA%2bylTfAGs1qJCjm9nxgYafyEWBFMPjt2sg351B&city=18343&cid=1732641&tag=41460a09-3e65-d173-1233-629e2428d88e&gclid=Cj0KEQjwvve_BRDmg9Kt9ufO15EBEiQAKoc6qlyYthgdt9CgZ7a6g6yijP42n6DsCUSZXvtfEJdYqiAaAvdW8P8HAQ&tick=636119092231&isdym=true&searchterm=%E5%A2%BE%E4%B8%81&pagetypeid=1&origin=TW&cid=1732641&htmlLanguage=zh-tw&checkIn=2016-10-20&checkOut=2016-10-21&los=1&rooms=1&adults=2&children=0&isFromSearchBox=true&ckuid=1b070b17-86c2-4376-a4f5-d3b98fc9cf45" source_code=requests.get(url) plain_text=source_code.text soup=BeautifulSoup(plain_text,"lxml") for a in soup.find_all("h3",{"class":"hotel-name"}): b=a.string.strip() …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Community related e-mail

    > You're not hitting the refresh button or anything, are you? No no, Dani. Look, to test, three hours ago I logged into my old account (`_1`), there the option …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Community related e-mail

    No luck Dany, now it is again unchecked :(
  • Member Avatar for cereal
    cereal

    Replied To a Post in Community related e-mail

    Well, okay, I was sure about it but not anymore, I updated my profile after your last message and now is still checked, so it seems fine.
  • Member Avatar for cereal
    cereal

    Began Watching Community related e-mail

    Hello, everytime I set the checkbox to get community related e-mails and update the profile, it seems to work and if it occurs an event I get the notification, but …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Community related e-mail

    Hello Dani, I hate to say that, but it is not solved, same issue ;(
  • Member Avatar for cereal
    cereal

    Revoked Solved Status for Community related e-mail

    Hello, everytime I set the checkbox to get community related e-mails and update the profile, it seems to work and if it occurs an event I get the notification, but …
  • Member Avatar for cereal
    cereal

    Replied To a Post in CodeIgniter Facebook Login Issue

    Try to increase the timeout. If you're using curl, then increase the values of `connect_timeout` and `timeout`, default should be 30 seconds.
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP and mysql

    Is **$conn1** a PDO or a MySQLi resource? It connects to the database correctly? Follow the documentation of the chosen library to properly work with prepared statements. If you just …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Is there a place on the Internet that archived Youtube videos 5 years ago?

    Hi, if you ever shared the videos on Twitter then check the Archive.org: * https://archive.org/details/youtubecrawl&tab=about Sincerly, I had difficult to find valid data in those copies but I'm probably doing …
  • Member Avatar for cereal
    cereal

    Gave Reputation to Reverend Jim in Going back to a certain part of a program?

    My two cents - a goto should only be used as an escape. In some rare cases when you have code that has several levels of nesting and whenever an …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Online PHP Debugger

    **@phpio** Hi, test diafol's script and execute `/` you get the system root, you can traverse the filesystem, you can arrive to the passwd file from there. Also, it's possible …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Online PHP Debugger

    **@diafol** Actually it is possible and it is also possible to overwrite files or inject code into the RAM... honeypot? :D
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP and mysql

    Example: $sql = "INSERT INTO `tentb` (`edate`) VALUES(DATE($edate))"; But you should be using prepared statements, so: $sql = $db->prepare("INSERT INTO `tentb` (`edate`) VALUES(DATE(:edate))"); $sql->execute([':edate' => $edate]);
  • Member Avatar for cereal
    cereal

    Replied To a Post in Sync local folder with FTP folder

    If you like something like OneDrive then you could set up WebDAV, just make sure Apache is running with the `mod_dav` modul, see: * https://httpd.apache.org/docs/current/mod/mod_dav.html * https://en.wikipedia.org/wiki/WebDAV
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP and mysql

    In the insert query you can use the `DATE()` function, see: * http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date
  • Member Avatar for cereal
    cereal

    Marked Solved Status for Community related e-mail

    Hello, everytime I set the checkbox to get community related e-mails and update the profile, it seems to work and if it occurs an event I get the notification, but …

The End.