Tag Archives: input

Could not open input file: artisan

Questions: When trying to create a new laravel project, The following error appears on the CLI: Could not open input file: artisan Script php artisan clear-compiled handling the post-install-cmd event returned with an error I am using the latest version of XAMPP v3.2.1 with PHP 5.5.15 and with mcrypt enabled (made sure of that by… Read More »

Input form with hidden field how to secure it

Questions: After i knew how to secure upload image Bypassing forms input fields to upload unwanted files i would like to give another example of from with 2 filed, one of them are hidden. SQL Table (id,name,jod,number) CREATE TABLE `users` ( `id` bigint(20) unsigned NOT NULL auto_increment, `name` varchar(255) default ‘0’, `job` varchar(255) default NULL,… Read More »

Jquery autocomplete and PHP: populating input field with data from mySQL database based on selected option in autocomplete field

Questions: I am trying to populate a Postcode (ie zipcode) input field with data from a mySQL database, based on the user’s selected option of Suburbs from a jQuery autocomplete field. The autocomplete works fine – the filtered Suburbs list is retrieved based on the input terms from the user. The source reference is a… Read More »

keep input value after refresh page

Questions: i have a form with input field and this input contain a drop down menu read information from database if the user enter value and when he arrive to the drop menu he doesn’t find what he want he go to another page to add this info to the drop down menu and than… Read More »

How can an id of input field can be read by PHP?

Questions: I have an HTML input field, and I have every input field specified with some id, now how can I use this input field id to identify the field. Example: <input type=’text’ id=’float’ name=’attributename’ value=” maxlength=’30’/> I need to verify the id of input field for float and then insert the input field’s value… Read More »

Codeigniter $this->input->post() empty while $_POST is working correctly

Questions: On a codeigniter installation, I am trying to use the inbuilt $this->input->post(‘some_data’) function, however $this->input->post() is an empty array. A print_r($_POST) gives all the variables fully and correctly? According to the codeigniter docs, The input class “is initialized automatically by the system so there is no need to do it manually”, leaving me wondering… Read More »

PHP: Best way to check if input is a valid number?

Questions: What is the best way of checking if input is numeric? 1- +111+ 5xf 0xf Those kind of numbers should not be valid. Only numbers like: 123, 012 (12), positive numbers should be valid. This is mye current code: $num = (int) $val; if ( preg_match(‘/^\d+$/’, $num) && strval(intval($num)) == strval($num) ) { return… Read More »

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT “INOUT”)

Questions: From PHP I would like to call a stored procedure in MySQL. The procedure takes input and output parameters — not “INOUT” parameters. For a simple example, say I have the following stored procedure in MySQL: DELIMITER $$ DROP PROCEDURE IF EXISTS `test_proc`$$ CREATE PROCEDURE `test_proc`( in input_param_1 int, in input_param_2 int, in input_param_3… Read More »