Questions tagged as 'php'

3
answers

Put the first letter of each word in upper case of a string

I want to put the first letter of each word in uppercase, ignoring the connectors for example: $str= mb_convert_case("PLATA JUGUETES Y ÚTILES", MB_CASE_TITLE, "UTF-8"); What I hope to get is: Silver Toys and Tools     
asked by 15.11.2018 / 19:23
1
answer

how to get the name of the month in php

What happens is that I need to get the name of the month and the year in the following way: Nov.2018, in vb.net I can do it with this code%% code but I also require it in php "some idea is I would really appreciate it     
asked by 15.11.2018 / 16:35
1
answer

Insert in MySQL database using PHP PDO Web Service

I am developing a PHP Web Service to consult and insert data in a database. Until now, the web service is able to search the table for records, however it is not able to insert them . There are only three php files. The first one is dbcon...
asked by 05.11.2018 / 22:53
1
answer

Problem with capturing the time with date ("ymd") PHP

I have that variable to take the current date    $ current_date = date ("ymd"); I have a problem I do not know the exact time but after 6pm to 8pm it takes the data as the current date + 1 some solution for it? if I do:    $ current...
asked by 05.11.2018 / 02:03
2
answers

Sum of five values

I'm trying to do the sum and I do not know which is the most effective way to add five values that will soon be more the simplest is $Datos[0]["Valor"]+$Datos[1]["Valor"]... but it would be the dirtiest so to speak. I thought of while...
asked by 05.11.2018 / 13:16
1
answer

Get the text of a php

I have a php code where I print an'echo' at the end of my entire process ie: <?php /* aqui va todo el proceso... */ echo "Proceso teminado"; ?> I want to know if you can close the browser window once that text appears. I know...
asked by 20.10.2018 / 21:04
1
answer

Several conditions within the same if php

I need to create an if with several conditions there are many examples in the forum but I do not give any to serve me. I need the if check two conditions the first one checking if the $user_id equals the auth()->user()->id) i...
asked by 05.11.2018 / 03:30
2
answers

get lastInsertId with PDO

I'm trying to get the last record in the database and it responds with 0 (ZERO) .. lastInsertId(); . This is my connection to the BD: class conexion{ public static function conectar(){ try { $link = new PD...
asked by 19.10.2018 / 05:40
1
answer

error in the account

I am creating a survey and when adding the total votes that have been made, I get an error. This is the code: <?php $resultado=""; if(isset($_COOKIE['voto'])) $voto=$_COOKIE['voto']; if(isset($_REQUEST['voteID'])) $voteID=$_REQU...
asked by 21.10.2018 / 16:32
2
answers

Help to choose a chart or data chart

I would like you to advise me based on your experience to represent data through graphs or charts, what happens is that I have a database in sql server, it contains more than 30,000 records, when making certain queries, this can give me as a res...
asked by 13.10.2018 / 01:22