Posts by Arsom Nolasco • 1,367 points
95 posts
-
0
votes3
answers1036
viewsA: Grab last key from auto increment PDO
searching on the subject I found this method that is in my opinion the safest because it takes directly the value of auto_increment follows the final code of the solved problem try { $sql = "SHOW…
-
2
votes3
answers1036
viewsQ: Grab last key from auto increment PDO
I have a problem with my system that is the following, try { $sql = "SELECT Nid+1 AS Nid FROM noticias ORDER BY Nid DESC LIMIT 1"; $stmt = $DB->prepare($sql); $stmt->bindValue(":Nid",…
-
1
votes0
answers31
viewsQ: Problem with INSERT using quote " "
in my script this working, when put a normal text inserts normal, however when I try to post some code type I am redirected to the error page 403 Forbidden You don’t have permission to access…
-
0
votes0
answers117
viewsQ: Error 403 depending on the situation
I have a page where I post and edit materia post.php, I use the editor in the content part, but the following is happening: when I insert a code <iframe scr="yotube.bla.bla.bla" ...…
-
1
votes2
answers462
viewsQ: Search without returning PDO data
My variable is being passed but the filter process is always not returning anything. try { $keyword = trim($_GET["keyword"]); if (!empty($keyword)) { $sql = "SELECT * FROM noticias WHERE titulo LIKE…
-
-4
votes1
answer31
viewsQ: Upload Out of Place
Well I’m a little confused here because I’m creating the folder but at the time of lifting it Upa a level up. where is the error ? if (is_uploaded_file($_FILES["foto"]["tmp_name"])) {…
-
0
votes1
answer479
viewsQ: Predict next Bank ID
Good staff I’m wanting to better organize the images of the posts but for that I need to know what will be the next ID so I check the image first before entering the rest of the data. if…
-
1
votes1
answer80
viewsQ: List as equal 3 column-Count
Well I think this is in css what is not my thing, I would like to be listing the results of the comic and pass the next result to the next column tried to use ( abridged) SELECT * FROM anuncios…
-
4
votes1
answer290
viewsQ: Progress Bar to follow input text
Well I’m starting in Bootstrap and I’m having a doubt whether or not it’s possible that I’m wanting. I have a textarea where it must limit the content to 300 characters it is already working:…
-
4
votes1
answer319
viewsQ: Apostrophe within echo
well I’m trying to put on the slide the images but the bet is breaking , where is the error? edited below the summary after the tests I did even using the \ . meu codigo atual echo "<div…
-
4
votes3
answers498
viewsQ: Write checkbox value to input
Well I would like to be registering the days of the week selected directly in Sert, however I would like to be passing these values as a "phrase" to the hidden field. What is the way to be doing…
jqueryasked Arsom Nolasco 1,367 -
2
votes1
answer89
viewsQ: Update of multiple Images
My code is currently doing its role well by uploading and putting the watermark on the upload images, however I would like to be storing the names of all images in the database. $idnoticia =…
-
4
votes2
answers174
viewsQ: The less consultation the better, right?
It is possible to vary the writing of the results, as an example below where I want to use. <table width="1000" align="center"> <tr> <td> NOTICIAS</td>…
-
0
votes1
answer48
viewsQ: Select by deleting another Select
well my scenario is this, I have 1 slide where shows the 4 last news SELECT * FROM noticias WHERE destacar='Destacado' ORDER BY idnoticia DESC LIMIT 4 below the slide I have a list of the other…
-
3
votes1
answer145
viewsQ: Insert into database recording in half
I take the name of the news and insert in another table, but one of the fields is going by half, follows image of print: Database Source code of where send: <input name="nomenoticia"…
-
0
votes2
answers6623
viewsA: Website does not update in real time, cache problem
try using this script was with a similar problem and solved <script> $(document).ready(function(){ setInterval(function(){cache_clear()},3000); }); function cache_clear() {…
-
3
votes3
answers5090
viewsQ: Limit text length with jQuery
I have a function that places the famous 3 dots ... after x characters. But I am in doubt of how to make the reticence enter exactly at the end of the word where is the limit of characters. Follow…
jqueryasked Arsom Nolasco 1,367 -
-2
votes2
answers229
viewsA: View how many people accessed pdf
Now if you want a quick fix First choose your code in one of those that generates online ex: http://contador.s12.com.br/ 2º create a file ex: contacliques.html and put in it <meta…
-
0
votes1
answer112
viewsQ: Switch Case PDO does not display
Changed further inside the title yet, the case works but does not display the result. <?php $sql = "SELECT tipo FROM publicidade WHERE posicao='Lateral' ORDER BY RAND() LIMIT 1"; $stmt =…
-
1
votes1
answer266
viewsQ: Select non-empty field
demo table id imagem flash codigo 1 fda.jpg 2 asdfasd.sfw 3 adsense is there any way to SELECT only the non-empty? if yes what is the best way in PHP or SQL? $sql = "SELECT * FROM publicidade ORDER…
-
4
votes2
answers676
viewsQ: Catch last delimiter with explode
I’m wanting to grab a file extension but the name of some images comes type: adsfasdfasd.234.asdfa.3rfr.jpg asdfsdafasdfasdf.45eg.png I’m trying to use the code: <?php…
phpasked Arsom Nolasco 1,367 -
2
votes3
answers163
viewsQ: SELECT filtering the first results
I have the HIGHLIGHT field (yes) (no) I would like to display the results by removing the first 4 results HIGHLIGHT (yes) and display the rest of the records both (yes) from the 4th and (no) I tried…
-
1
votes1
answer87
viewsQ: Insert, upload and Update in the same process
Good to have a problem here that I have tried to solve in several ways without success. It follows part that is catching $stmt->execute(); -------> final do insert até aki ok if…
phpasked Arsom Nolasco 1,367 -
2
votes1
answer103
viewsQ: Create folder and upfile during same file
I want to insert a news along with the image file in a single post, the problem is that I would like to create a folder with the news ID where the image will be stored. It’s happening that the…
-
0
votes1
answer144
viewsQ: Why create the folder and not upload the image in sequence?
if ($_POST['salvar']) { $titulo = $_POST['titulo']; $conteudo = $_POST['conteudo']; $imagem = $_POST['imagem']; // titulo duplicado $sql = "SELECT * FROM noticias WHERE (titulo=:titulo)"; $stmt =…
-
3
votes3
answers284
viewsA: Create folder and ID simultaneously using the same id number
With the help of @rray and @Maniero gave a bigger idea about the problem, it was not working after the if , just put after the execute that worked. $stmt->execute(); $ultimoid =…
-
3
votes3
answers284
viewsQ: Create folder and ID simultaneously using the same id number
I need that when the user is entering a new article to be created a folder with the same number as the article ID. <?php include './includes/config.php'; setMenu("Notícias"); include…
-
0
votes1
answer1336
viewsQ: How to get the next ID to be inserted?
I’d like to get the next ID inserted, something like: $ultimoid = (DB::lastInsertId()); $futuroid = ( $ultimoid + 1 ); The goal is to previously know the ID that will be used in my INSERT because…
-
2
votes2
answers167
viewsQ: Use substr directly on a foreach
My scenario is this:: foreach ($exibe as $u) { echo "<div class='col-md-3'><div class='thumbnail'> "; echo "<img src='{$u->imagem}' height='120px' class='img-thumbnail'>"; echo…
-
1
votes1
answer416
viewsA: jquery upload file pass php variable to Javascript
My problem was I was missing a bar: $output_dir = "../imagens/$id"; Adding her: $output_dir = "../imagens/$id/"; Worked
-
0
votes1
answer416
viewsQ: jquery upload file pass php variable to Javascript
am using this plugin JQUERY UPLOAD FILE and it is all ok with the upload I am increasing function of creating directory and upar inside them however I am not able to pass the variable id of php to…
-
0
votes1
answer143
viewsA: Insert with Bootstrap Switch
solved the problem is just take the post and define it: $destacar = (isset($_POST['destacar'])) ? 1 : 0; $status = (isset($_POST['status'])) ? 1 : 0;
phpanswered Arsom Nolasco 1,367 -
0
votes1
answer143
viewsQ: Insert with Bootstrap Switch
I am having a doubt in the following scenario, I am trying to insert the status using the plugin Plugin Link Here is a summary of the code I’m using $status = $_POST['status'];…
phpasked Arsom Nolasco 1,367 -
2
votes1
answer675
viewsQ: enable onclick in the Select of a form
I need to do that by clicking on select popup but it is not working, already the input works normally $("#alert_button").click( function() { jAlert('Selecione Primeiro o Estado', 'Classificados…
-
3
votes1
answer41
viewsQ: How to set up a field using three others?
I have the following fields in the database: | id| estados | cidades | categoria | todosjuntos | | 1 | mg | sao paul| informati | mg/saopaulo/informati | The first four are populated, but I would…
-
2
votes2
answers426
viewsQ: str_replace using arrays
I want to blacken the terms searched in the results, but when I use the explode, and I try to use in str_replace, I get a array back. <?php $search_term = filter_var( $_GET['s'],…
-
2
votes1
answer230
viewsQ: How to search for multiple order independent terms?
my scenario and the following, I have an input where the user puts the term and clicks on search EX: car horizon [ENTER] however you are listing the result of the separate words EX: 3 results found…
-
0
votes1
answer62
viewsQ: Use distinct in Row
Good staff I am with a doubt, I am trying to return from the comic only states that possess the searched term however I do not want to repeat them. follows the code <?php $search_term =…
-
5
votes1
answer58
viewsQ: multi column adjust content
I’m taking the results from a survey and displaying in a div using column Count width:800px; -webkit-column-count: 3;-moz-column-count: 3;column-count: 3; but I need the column to be closed at the…
-
1
votes2
answers1725
viewsQ: Window Modal Frame Overlay
My scenario is the following, I have 3 frames top (100px) content( * ) and footer (20px) I would like to open a modal window (the link is the top frame)where the mask was above the 3 frames( in the…
-
6
votes2
answers25999
viewsQ: How to position one div under another with varying sizes?
I have the following situation: I search the database results and display them this way <div style='background-color:#fff;width:260px; margin-left:5px;margin-top:5px;float:left;'> texto…
-
0
votes2
answers2326
viewsA: Find and replace before and after using an sql wildcard
I ended up using the regular expressions of excel where I searched with ...-... and replaced with -, it worked well , then I imported it again to the database, then I will search if sql has this and…
sqlanswered Arsom Nolasco 1,367 -
1
votes2
answers2326
viewsQ: Find and replace before and after using an sql wildcard
I have a list of over 5000 cards with different names and one - (hyphen) in common. Example: Evilswarm Exciton Knight LVAL-EN056 Number 101: Silent Honor ARK LVAL-E47 Number 11: Big Eye GAV-EN090…
sqlasked Arsom Nolasco 1,367 -
2
votes2
answers1434
viewsQ: Show users online
Good people I’m wanting to make a system where shows online users at the moment but they are displayed more without restrictions, someone gives me a light $timestamp=time(); $timeout=time()-300;…
-
1
votes2
answers468
viewsQ: update in 2 tables with calculation and field update keeping the previous
People I am trying to do an update taking the value of another table, but the data of the second table is not sent. I’m passing the card ID: <a href=index.php?pag=shopcomprar&id={$row['ID']}…