Questions tagged as 'php'

2
answers

Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in [duplicate]

I have a simple problem when picking up a data from a table .. The error is    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result,   boolean given in Code: $sql = mysqli_query($conexao, "SELECT diasvip FROM logi...
asked by 07.03.2015 / 14:48
3
answers

Is Microsoft Azure recommended for hosting gaming sites?

I want to get a Microsoft Azure plan but I have questions. I am a game developer so I wanted to know if it is recommended to host the site and host the server files on a Windows machine. If you wanted to know if their site hosting supports...
asked by 10.03.2015 / 19:39
1
answer

Is it possible to use the "break" argument on a "switch" to break a loop?

When I want to break a loop of a for , while or foreach I always use break; within a if with the following structure: $teste = array(1,2,3,4,5); foreach($teste as $t){ if($t == 3){ echo "Terminando loop a...
asked by 20.04.2015 / 23:20
3
answers

Site within App

I have a classifieds site, I need to create an Android app from my site, I do not program in Java, can I create an app where the site is displayed in mobile? Type a site iframe within the app.     
asked by 06.10.2015 / 02:52
3
answers

Capture Input ID

Does anyone know how I can capture the id of an input and send it to the database? EXAMPLE I have this input: <input type="checkbox" name="adicional" id="Leite Ninho" value="2.00"> It has the name that I will use to call it th...
asked by 30.10.2015 / 16:49
4
answers

You can simplify the IF statements in PHP

Personal I'm creating a draw system in PHP language Here is an excerpt of the code I started to program but the problem is that there are 19 different hit combinations this one down here is just the first! is there a more practical way to do it...
asked by 11.11.2015 / 16:24
5
answers

How can I capture a favicon from a website via PHP?

I load an external content from a website and then import it into DOMDocument . I can currently capture information from the title tag easily. I do this: $dom = new DOMDocument(); @$dom->loadHtml('<?xml encoding="UTF-...
asked by 07.10.2015 / 15:11
2
answers

Is it possible to use $ this with static methods?

   Before questions or criticisms arise, it is not possible to do this, simply because static methods do not have access to public, private, and protected variables and methods, because they are accessible even without an instance of the class...
asked by 13.11.2015 / 02:58
2
answers

Convert time format in seconds

I have a value displayed by a json: "tempoShoutcast":"03:11:48" How can I make this format for seconds?     
asked by 11.01.2017 / 07:15
2
answers

What's going wrong? BD + Laravel

I'm having a blade form picking up the values from the database. In it I have a date field not required to be filled. When you register an empty date, the results screen displays the date "01/01/1970" . How do I change this behavior...
asked by 13.01.2017 / 17:33