Questions tagged as 'php'

2
answers

Problem when updating records in the database

The code returns the values that are registered in the database, but at the time of modifying the data and pressing the save button, the changes are not executed. RecordDelegations.php <? $conect = new mysqli("localhost", "mpadioce_ho...
asked by 06.09.2018 / 10:27
1
answer

Know if a word is found in a string in php

I have the following code: $msg = 'Hola :1: quetal??, :2:'; $emoticones = array(':1:',':2:',':3:'); $cntidademoticon = explode(' ', $msg); foreach ($cntidademoticon as $string) { echo '<br>'.$string.'<br>'; } What I am looki...
asked by 19.08.2018 / 02:46
2
answers

Error Crud update Laravel

Someone helps me with this error that has me already with a headache please Part of the Controller of the Update: public function edit($id) { return view("almacen.categoria.edit",["categoria"=>Categoria::findOrFail($id)]); }...
asked by 24.08.2018 / 17:17
1
answer

Why does ucwords () behave like ucfirst ()?

I have an array of people from which I want the first letter of each word to become capital, so I am using ucwords() . The problem arises since you are acting as if you are using ucfirst() . Code: foreach ($data['alumnos'] as &a...
asked by 06.10.2018 / 00:06
2
answers

Validate several input with a single function

I have a form made in HTML with several controls and a script in javascript to validate if they are full or not, the problem is that I want to validate each one but not to do a function for each control window.onload = function () { do...
asked by 09.08.2018 / 20:26
1
answer

How do you load data from ajax when the page loads?

What I want to do is that when entering the page, a table with the information of the users is loaded, but using JS, I do not like to put PHP code in the HTML, the question is that I do not know how to apply it through ajax, Data will be sent, w...
asked by 28.07.2018 / 02:13
3
answers

Current date in input html

I'm looking for the field: <input type="date" id="fecha" name="fecha" Type date show the current system date, thanks.     
asked by 09.08.2018 / 21:54
2
answers

Organize the database for the consultation [closed]

Very good! I will try to be specific and brief at the same time:) I am developing an amateur app using Bootstrap to track cheese making at home. During the process the cheese goes from one room to another. In a mysql table I add with a form e...
asked by 19.07.2017 / 22:27
1
answer

Error in INSERT SQL php

When trying to make a query from php to a database, I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' ' at line 1 I know it's something...
asked by 02.05.2018 / 23:21
2
answers

Help with PHP array

I have an array with numbers and I have to check if they are ordered from lowest to highest. In case they are well ordered, show that they are ordered or not if they are not. The fact is that I have it almost but I get the following warning: No...
asked by 28.10.2018 / 18:17