Posts by Alisson Acioli • 5,815 points
323 posts
-
0
votes2
answers1119
viewsA: Manipulating XML with PHP
You have to also pass the parameters "Father" of the element. $xml->note->nome; As you can see <nome> is inside <note> then you’ll have to set note in the code.…
-
1
votes0
answers177
viewsQ: Multiple selection of radiobutton
I’m making a registration form that has the link Add more fields and when the person clicks on it, multiplies the form fields. One of these form fields is 2 radios Buttons, which are "Do you have…
-
1
votes0
answers3777
viewsQ: $. ajax - POST ..... 500 (Internal Server Error)
I am sending a request to a URL by function $.ajax() and I need you to return to me one of the parameters (was, error, Nothing). In the localhost is working correctly, put on the server and returns…
-
5
votes1
answer149
viewsQ: What is ~ in regular expression for?
I have the code: function addhttp($url){ if(!preg_match('~^(http)s?://~i', $url)){ $url = 'http://'.$url; } return $url; } It adds HTTP if the given URL does not contain, but what I’m doubtful about…
-
10
votes6
answers66144
viewsA: Type of the CPF or CNPJ field in the VARCHAR or INT database?
Use VARCHAR you will have problems if the user uses . (point) or/and - to separate the digits. If you do some checking and remove these or other characters, then you can use INT. But I recommend…
-
0
votes1
answer333
viewsQ: Align size according to larger text
I have a menu and some submenus, I need the submenu to be aligned width from it according to the larger text, because there are texts that can contain only 5 words but texts in the submenu that can…
-
4
votes4
answers798
viewsQ: Filter <td> with PHP
I have several <td> <td>Conteúdo</td> <td>Conteúdo</td> <td>Conteúdo</td> <td>Conteúdo</td> <td>Conteúdo</td>…
-
1
votes1
answer662
viewsA: Error sending email with PHPMAILER
Exchange the require('class.phpmailer.php'); for require('PHPMailerAutoload.php'); Don’t forget to check if you have the file Phpmailerautoload.php in the folder where you are calling Phpmailer…
-
0
votes1
answer391
viewsQ: php mail() function is not working
I’m using the function mail() PHP to try to send some data that is informed in my form; the function is returning true only the email never reaches the recipient. Below is the PHP code: $headers =…
-
4
votes1
answer975
viewsQ: jQuery click does not work on results coming from $.post
I’m developing a delete button on the product form I have, it works like this Category 1 (Radio Button) Category 2 (Radio Button) After selecting a category, it sends a command jQuery for the…
-
0
votes0
answers35
viewsQ: Scroll down to the end of the div
I have the code 1 - $("#fluxo-msg").load('fluxo-mensagem.php', {fake:fake, user:user}); 2 - 3 - $('html, body').animate({ 4 - scrollTop: $("#vemaqui").offset().top 5 - }, 1000); In the line 1 i…
-
3
votes2
answers2395
viewsQ: Add <option> to <select> with jQuery via $.post’s callback
I’m making a select that will have some users and when selecting a user will send a request $.post to get all records related to the selected user. After returning the related entries, the jQuery…
-
0
votes3
answers1481
viewsA: How to not show img element where src is equal to null
Create a blank default image and check to see if the src image has something, if not, put the image blank. <?php $imagem = $variavel['imagem_do_banco']; if($imagem == '' or empty($imagem)){ echo…
-
0
votes1
answer185
viewsQ: Block PHP contact media
I am developing a system where I need not allow contact forms like email, skype, facebook and phone. I wanted to use str_replace() only that I would have to make a giant list with a few words that…
phpasked Alisson Acioli 5,815 -
1
votes1
answer384
viewsQ: Doubt when picking up repeated checkbox group
I am making a registration form where I have every day of the week to select <input type="checkbox" name="dias[]" value="Segunda"> Seg <input type="checkbox" name="dias[]" value="Terça">…
-
1
votes1
answer1336
viewsQ: Perform action when closing browser
I have a system that marks if the person is available or unavailable . There is a button called get out of. If the person clicks on it when it is available, then it automatically changes the status…
-
0
votes2
answers627
viewsQ: Appear update equal to facebook, on time
I have to make a system where the user sends a message and the one who receives it, sees the number 1 on the menu side, at the time the message is received. Like facebook, when you get a…
-
0
votes2
answers257
viewsQ: Pick up messages sent and received from Mysql
I am developing a personal messaging system and I need to list the messages I received and the messages I sent, only that I am having difficulties, because the code I did can only get all that I…
-
0
votes5
answers2514
viewsQ: Secure API does not return purchase status
Previously I had opened an error question in the pagseguro API, well, I managed to solve it. Now my problem is another... I can’t get paid notifications. I already set up the URL in the…
-
-1
votes1
answer698
viewsQ: Error: CURL can’t connect: Protocol https not supported or disabled in libcurl
I am using the pagseguro API to make purchases on my site, it was working very well, normally. Today when I went to use again began to present this error: Not Found The requested URL /admin/usuario/…
phpasked Alisson Acioli 5,815 -
0
votes1
answer1815
viewsQ: Innerjoin no Codeigniter
I’m working on a code and I need to make an association, where I have to count the amount of voting in a video. The problem is that there are 2 tables a videos and voting . In videos is the…
-
6
votes2
answers240
viewsQ: Search returns equal data
I’m making a search system where there are some fields (conditions) to search and find the results. These fields are not mandatory, if the person type something he will find by the data entered, if…
-
1
votes1
answer939
viewsA: PHP edit image
See, I put one if to check whether the array containing the image name exists and whether it returns something other than empty. If it returns it is because the user has also sent an image in…
phpanswered Alisson Acioli 5,815 -
2
votes1
answer1370
viewsQ: Problem with accentuation Curl
I have a code that sends data via cURL to another page inside the server, only I have a problem... When sending this data to the other page, it inserts it into Mysql only when seeing the record…
-
2
votes2
answers389
viewsA: Failure to validate fields
Make jQuery check the field even if the button is enabled and the field is empty. As soon as the person clicks on the next button, before any action to redirect it to the next page, do something…
-
6
votes2
answers1104
viewsA: What is the best way to upload files with Ajax?
A tip is that you upload the content separately. Make a command with the programming language you will use, making an INSERT for the data as name, title, etc. After you have made the SQL command to…
-
11
votes1
answer28571
viewsQ: Enable . htaccess in Ubuntu
I’m using the Ubuntu system on my PC and my apache doesn’t seem to recognize htaccess, none, because I created one. htaccess to my project only that it does not interpret what is in the content. The…
-
2
votes3
answers248
viewsQ: Display images from right to left
I am currently having a problem with my code because I need the images to be displayed on the screen but that they come from right to left. The default is we put the codes <img> and they are…
-
1
votes2
answers659
viewsQ: Add thousandths to jquery counter
I have a Javascript code that makes a counter Days / Hours / Minutes / Seconds . I just need him to count the thousandths, but I have little knowledge in javascript and I don’t know how to increase…
-
1
votes2
answers440
viewsQ: Select only 1 record with the same category and Hidden in the other
I have to list some Humbs of the same category only I want to appear 1 for the user and others stay as Hidden in the code. I’m seeing with GROUP BY categoria only if I do it and give while() it…
-
1
votes2
answers3680
viewsA: How to do the . jQuery load only the content inside the <main>?
in HTML put: <body> <!-- No caso, o header é a parte fixa, que não muda. --> <header> <div>"Aqui fica o player de audio."</div> <ul> <li><a…
-
3
votes3
answers1380
viewsQ: Switch page time transition
I have an HTML code and I need to make a transition (fade) when I enter another page through the HTML menu I have. The problem is that I’m not able to make this transition. I need to do something…
-
1
votes8
answers27292
viewsA: PHP does not send accents to Mysql database
Put the collation of the database ALWAYS as utf8_general_ci and in PHP code, when der Insert do so $nome = utf8_encode($_POST["nome"]); I’ve always worn it like this, I’ve never had a problem ;)…
phpanswered Alisson Acioli 5,815 -
4
votes1
answer9877
viewsQ: Put Authorization: Basic in the api
I am creating an API as already said, and I need to use the Authorization: Basic KEY to send login and password via header. Unfortunately I am not aware header('Authorization: Basic…
-
1
votes1
answer131
viewsQ: Array is not as array
I have the following code <?php while($data = $QuerySearch->fetch(PDO::FETCH_ASSOC)){ $js[] = $data; } $r = array(); $arr = array(); foreach($js as $k=>$v){ foreach($v as $col=>$c){…
-
0
votes3
answers428
viewsA: Test equal values (data) in PHP
Convert the dates to strtotime() and make the comparison, comparison in whole numbers becomes easier.
-
1
votes1
answer6313
viewsQ: Regastar Mysql column name and values
I want to get the name of the columns of a table and their respective records.. Ex: I have the table criminal records and on it are the columns name, login, password and there are 2 records recorded…
-
1
votes1
answer89
viewsA: Creating 7 selects with PHP and Mysql
If you want to display 7 SELECT’s with the same results, you can do so <?php $db = mysql_connect('localhost', 'root', 'vertrigo'); $bd = mysql_select_db('cadastrosDados', $db); $SQL =…
-
0
votes3
answers1119
viewsQ: PHP is not displaying array output
I have the code: <?php $d = json_decode($output); ?> The variable $output sends json data to PHP. To better understand this variable, I will post the return of it object(stdClass)#1 (6) {…
-
2
votes2
answers408
viewsQ: Loop json with PHP
I have the following json { "nome": "Alisson", "nome": "Bruno", "nome": "Junior", "nome": "Nicolly", "nome": "José", "nome": "Greice", "idade": "20", "idade" : "21", "idade" : "29", "idade" : "14",…
-
0
votes1
answer1593
viewsQ: Records are duplicating when entering in the database
I’m doing an API and I’m going through a problem. When executing the script that calls the page via Curl, it does the insertion of a register in the database, but when it comes to registering only…
-
-2
votes1
answer180
viewsQ: Put Scroll when it’s on fullscreen
I am creating a page and it enters fullscreen, but I have problem when enters fullscreen the rest of the content that is "below" is not shown, only appears until the limit of the monitor. I’m trying…
-
0
votes1
answer8104
viewsQ: Load page via load()
I’m looking to get my pages loaded via jquery load(), only I’m facing a problem. I have a menu with links on a page called menu.php I’m hoping that when I click on the links in the menu.php it opens…
jqueryasked Alisson Acioli 5,815 -
3
votes1
answer1419
viewsA: How to make a script run automatically?
To send in 100 out of 100 you will have to program this in the script you use, to select 100 records. In windows I do not know how to do this, but I recommend you to use Linux (Hosting) and use the…
-
0
votes3
answers259
viewsQ: Fix SRC Urls by HTACCESS
I am using URL friendly via HTACCESS and because I am using it the pages lose the Styles and js. Because the path (URL) is done as ex /category/pizza so it looks for src="category/pizza/style.css" .…
-
6
votes3
answers2834
viewsQ: Run action after 2 minutes without moving the mouse
How to create a function in jQuery redirect the visitor to a page after the visitor does not move the mouse for 2 minutes or more? Example: The user is on the page php products. and if the user is…
-
1
votes1
answer655
viewsQ: User-friendly URL with HTACCESS
I’m making my system that will use htaccess-friendly URL, only I’m having a question/problem. My HTACCESS is as follows: RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond…
-
2
votes3
answers614
viewsQ: jQuery’s$ doesn’t work
I’m using a code that uses $ jQuery, only when using the cipher it error in the console and the jQuery code ends up not working. The only solution was to use jQuery instead of $ :…
jqueryasked Alisson Acioli 5,815 -
0
votes2
answers1024
viewsA: Create links with a mysql table name and display its contents on another page. Is it possible?
Tries: <?php $dbname = 'mysql_dbname'; if (!mysql_connect('mysql_host', 'mysql_user', 'mysql_password')) { echo 'Could not connect to mysql'; exit; } $sql = "SHOW TABLES FROM $dbname"; $result =…
-
0
votes1
answer875
viewsQ: Return json to a variable
I have a code in PHP that creates a json: <?php $array3 = array(array('0,1300', 'Thalita', 'Nicole')); echo json_encode($array3); ?> And I have another code that is in jQuery that forms a…