Most voted "php" questions
Use this tag when the question refers to some resource, information, or problem relating exclusively to the PHP programming language. For example: questions about classes, methods, functions, syntax and general use of this language. Do not use this tag if PHP is used circumstantially, but has no relation to the question problem. For example: do not use this tag for questions about HTML formatting, CSS or Javascript code.
Learn more…27,244 questions
Sort by count of
-
-5
votes1
answer1825
viewsWhere can I find the php.ini file on my hosting server?
I created a website and hosted it in a third-party service. It’s working very well but I don’t know where is the php.ini configuration file to configure some things. Does anyone know how to locate…
phpasked 6 years, 7 months ago Vinicio Schmidt 82 -
-5
votes3
answers1601
viewsHelp me with the "Undefined index: referrer in " PHP error
I’m making the following mistake: Notice: Undefined index: referrer in C: xampp htdocs brpg register_content.php on line 71 The archive register_content.php is: <link href="css/login-form.css"…
-
-5
votes3
answers117
viewsGenerate a query number?
I have a search system and I want to generate a number for each search made in the database, I’m thinking of using the rand to generate the numbers, then take the generated number and save to the…
-
-5
votes1
answer361
viewsPHP ERROR syntax error, Unexpected '>'
<?php // começar ou retomar uma sessão session_start(); // se vier um pedido para login if (!empty($_POST)) { // estabelecer ligação com a base de dados mysql_connect('host', 'user', 'senha') or…
phpasked 8 years, 2 months ago Pedro Henrique 1 -
-5
votes3
answers73
viewsHow to close a Session in PHP
I’m having trouble trying to destroy the sessions, I tried the code below, there is some way beyond that? <?php session_start(); session_destroy(); header('Location: index.php'); ?> What…
phpasked 6 years, 1 month ago João Vitor 70 -
-5
votes1
answer128
viewsHow to break table row with mysql data
Hello I made a request system more would like to know how I can do to break the line after the commas . So when I print the order in the kitchen it comes as follows Tambaqui rib : 1 Tabaqui Frito :…
-
-5
votes1
answer399
viewsHow to read a Json file in php
{"acao":"muda-quantidade","dados":{"nova-quantidade":"2","referencia":"produto-um"}} I’m learning Json,and I’m trying to read a json file in php and I’m not able to read the second array, (data), if…
-
-5
votes1
answer46
viewsHow do I make a mask that adapts to priced inputs?
I was using Jquery but how do I adapt to put 2 numbers insert a ',' this way but would be necessary to put 4 values, and I do not know the exact price that would be…
-
-5
votes3
answers80
viewsKnow the total values in the php array
I need to resolve a situation with the array, it seems to be simple but I’m not getting it! I have the following array: $total = array("6.00","7.00","9.5","10","5.5","7.75","6.5","9"); I need to…
-
-5
votes1
answer46
viewsWhat’s wrong with my css code?
What’s wrong with my css code?…
-
-5
votes1
answer41
viewsHow to advance two decimal places in php or javascript
I’d like to do the following I have the value 1000000 and I have to format it like this 10,000.00 Because the value comes to me already formatted and I can’t use between (mysql) to fetch a value so…
-
-5
votes1
answer30
viewsWhat is the right way to do this in Curl PHP?
What is the correct form of this code in Curl php? curl --user {client_id}:{client_secret} -H 'Content-Type: application/x-www-form-urlencoded' -d grant_type=client_credentials…
-
-5
votes1
answer91
viewsPHP code does not work
I am trying to make a code that will appear on the screen of the page "FEB ONLINE" when the server is on, however, is giving error and also does not show "FEB ONLINE" when the game server is online.…
phpasked 7 years, 10 months ago funkygtacat 00 3 -
-5
votes1
answer113
viewsError closing php tag
My code is giving the error Parse error: syntax error, Unexpected end of file in C: xampp htdo... When I see where the error is, it is at the closing of the tag <?php. What could be going on?…
-
-5
votes1
answer227
viewsI am not finding the error syntax error, Unexpected end of file in the browser point at line 88
<?php require_once("".$_SERVER["DOCUMENT_ROOT"]."/funcoes.php"); require_once("".$_SERVER["DOCUMENT_ROOT"]."/mistake.php"); $whom = anti_sql($_GET["a"]); if($whom>0){ setcookie("indicado",…
phpasked 7 years, 9 months ago ROSENILDO BARROS DE ALMEIDA 1 -
-5
votes2
answers170
viewsIF IF IF how to do? PHP IF with syntax error
In the code, there are several conditions, according to the choices of the user. The system is simple, just checks whether or not the user can receive unemployment insurance. I’m following the…
-
-5
votes1
answer282
viewsMy website has been cloned would like a help from where to start solving the problem
Dear gentlemen I have a website, https://torrentfilmesagora.net, this August I discovered that I was being cloned, clone sites: http://powerofourpotential.org, http://griyaok.com,…
-
-5
votes1
answer148
viewsAssign Json content to the PHP variable
Hail to you guys, I’m starting in the Webservice world and I’ve come across the following problem. The TOTVS Server via Rest, returns me exactly as follows: $resposta =…
-
-5
votes1
answer650
viewsDownloading HTML from a page
I would like to know a way or plugin that helps me to download the HTML of the page in format .html. My goal is to make it possible to edit images and texts in an image and finally to download it. I…
-
-5
votes1
answer39
viewsI cannot write to the PHP database
File 1 picks up the data to enter into the database, the name and email are correctly being recorded, but the phone does not go to the database. FILE 1 <script type="text/javascript"> function…
-
-5
votes1
answer42
viewsHow to structure a PHP project for multi ecommerces working with the same crm
I need to develop 5 virtual stores in different lodgings, where all will be managed by a hosting x. H2,H3,H4,H5,H6 -> (H1) In the H1 hosting will be the CRM panel, where will be printed orders,…
-
-5
votes1
answer42
viewsPage redirection when performing research
Personal I have the following code below: Where the user will perform the search in the input, and will click the "button " next, where activates the onclick event that redirects the same to page…
-
-5
votes1
answer67
viewsHow to use the ROUND function in Laravel
insira o código aquiI have the following query in PHP: $transferencia = $conecta->rawSelect( 'SELECT * FROM register WHERE ROUND(valor,2)="' . $json->VALORLIQUIDO . '" ' ); How I perform this…
-
-5
votes2
answers72
viewsWhy does "0" not appear? Once the logic of "do while" is: do yourself then check
If you literally analyze the loop do while, makes perfect sense since something is done while this is true, but pragmatically has no logic. For example, in the code below, when we arrive at the…
-
-5
votes1
answer60
viewsShow bd field on web page
I’m new in web development, I took a course and I’m using as a base the site we developed there. But some things I still don’t understand well and I’m having trouble pulling the field nome database.…
-
-6
votes1
answer330
viewsPHP class - How to use
How to use a specific php class ? For example: <?php class Torrent { public function scrape(array $announce = [ ] , $hash_info = null) { $r = [ 'seeders' => 0 , 'leechers' => 0 ]; foreach (…
-
-6
votes1
answer40
viewsWhy am I not able to create a function within a class named after the array list of a class method in php?
Why am I unable to create a function within a class named after the array list of a class method in php? function $this->info[0](){ }
-
-6
votes2
answers522
viewsQuery SQL with multiple WHERE conditions
I was trying to make a search system that searched in 2 fields of the table at the same time and could have several conditions in SELECT WHERE, I searched in several places and found this query, but…
-
-6
votes2
answers208
viewsPHP - associative array: check the amount of elements within a value (which has an array) of a key
I have an array like this: $array = array( user => "user1", name => "name1", books => "book1", "book2" ); I want to go in Books and check the value that elements have inside it, in case it…
-
-6
votes1
answer107
viewsConsult in two tables simultaneously with two different parameters
Hello, good night! I’m creating a schedule of events by time, in different locations. So I need that, even before scheduling the event, show which venues are available, after the available venues, I…
-
-6
votes1
answer56
viewsTwo different conditions are valid for the same value
<td> <? if($online['status']==1){?> <span class="badge badge-primary"><?php echo lang('texto um'); ?></span> <?}else{?> <? }?>…
phpasked 6 years, 4 months ago Leandro Borges 3 -
-6
votes1
answer72
viewsVariable validation
I saw some examples of variable checking to set values. For example: $nome ?? "Tem nome"; $nome or "Tem nome"; In this case, you have the reverse validation? I’d like to do something like that:…
-
-6
votes1
answer126
viewsERROR WHEN SELECTING THE DATABASE
Warning: mysqli_select_db() expects Parameter 1 to be mysqli, string Given in C: Users wesle Onedrive Images New htdocs MOBILE folder db.php on line 3 FAILURE TO SELECT THE DATABASE $connect =…
-
-6
votes2
answers415
viewsSearch in the database with select
I am developing a website to display registered videos, for this I did with a select to select the desired discipline of the user. Soon after I put a button to display these registered videos…
-
-7
votes2
answers70
viewsWhere is the mistake?
while($row = mysql_fetch_assoc($result)) { if($row['level'] = '0') { echo("Fundador '); //pode fazer tudo } if($row['level'] = '1') { echo('Admin'); // nao pode adicionar nem remover e/ou edit users…
-
-7
votes1
answer153
viewsBook tip for those who stopped in time
Hello, I scheduled until mid-2012, I stopped then and I intend to return to my studies, but a lot has changed. My main area was the web, using php 5.3 , html 4 , css 2 and javascript with jQuery.…
-
-7
votes1
answer105
viewsRefer to PHP PDO user
For those with the doubt as I had, below I’ll leave the code ready, just change to your project. The code is simply to know the user logged in and say his name in PHP PDO. If your project is by…
-
-7
votes1
answer2504
viewsInsert space into a PHP variable
Hello I see that it is a very simple question apparently but I am finding a lot of difficulty in doing this, I must probably be looking the wrong way on the subject, what I am trying to do is the…
-
-7
votes1
answer381
viewsError: Undefined variable 'x' in'local
I’m learning PHP, on the page appears that: "Notice: Undefined variable: tasks in C: xampp htdocs index.php on line 42." Código PHP: <?php $bdServidor = '127.0.0.1'; $bdUsuario = 'felipe';…
-
-8
votes1
answer124
viewsDifficulty when combining web languages
I’m a beginner in web programming and I’m making a mess when it comes to mixing the codes, I have studied a lot but I still have a lot of doubt at the moment to combine all the codes, for now I use…
-
-8
votes1
answer79
viewsInsert Into Does Not Send Values
I have this code to send values to a table in the database, it is not displaying any, it is simply not sending values <?php include "../../lib/inc_con.php"; $mesa = $_POST['mesa']; $tamanho =…
-
-8
votes2
answers47
viewsHow to register more information in the table
This is my code: $nome = $_POST['nome']; $rg = $_POST['rg']; $endereço = $_POST['endereço']; $conta = $_POST['conta']; $agencia = $_POST['agencia']; $operação = $_POST['operação']; $bandeira =…
-
-9
votes1
answer2229
viewshow to start youtube video automatically in iframe without autoplay?
how could I do that in this code below <iframe width="420" height="345" src="https://www.youtube.com/embed/Y3wtmZ4Ds3M?autoplay=1" frameborder="0" allowfullscreen></iframe> no matter the…
-
-11
votes2
answers66
viewsArray , This code above is no mistake and when I open it :
http://prntscr.com/jjnyib That code above is no mistake and when I open it : http://prntscr.com/jjo0ga…
phpasked 6 years, 10 months ago Antonio Carlos Gomes 1