Posts by William Alvares • 384 points
18 posts
-
0
votes1
answer121
viewsA: Print array on Twig
Tries: {% for var in i %} <li> {{ var.id_question }} </li> <li> {{ var.date_created }} </li> <li> {{ var.anuncio }} </li> {% endfor %}…
twiganswered William Alvares 384 -
-1
votes1
answer69
viewsQ: How to add current date with variable date
I am with a Countdown, but without success, I could not get the date too, in this Countdown is only Hour, minutes and seconds, wanted for the Days too. Code: https://jsfiddle.net/nLuj6xrz/1/…
javascriptasked William Alvares 384 -
0
votes0
answers53
viewsQ: Change Jquery is being triggered without change
Hello, I have a JS code that gives the value for a price slider, and in this JS has a change that is being triggered and inside the change has a Rigger that triggers another part of the JS that does…
-
0
votes1
answer39
viewsQ: How do I add a new value to an array?
How do I add new values in an array? For example, I have: foreach ($Read->getResult() as $PDT): $pdt_promo[] = $PDT; And outside the foreach I give a var_dump($pdt_promo), with the data I receive…
phpasked William Alvares 384 -
-2
votes1
answer613
viewsQ: Change text with Javascript
Hello, Someone could help me with a JS script to change the button text instantly ? But change only when the status of the $x variable changes from 0 to 1, or when you click on the button containing…
-
0
votes1
answer342
viewsQ: Use . ini file to save connection data to DB?
Hello, Using file . ini to save database connection data is a bad practice?
phpasked William Alvares 384 -
1
votes2
answers743
viewsA: UPDATE in all records, changing autoincrement number
SET @num := 0; UPDATE your_table SET id = @num := (@num+1); ALTER TABLE your_table AUTO_INCREMENT =1; Solved
mysqlanswered William Alvares 384 -
0
votes2
answers743
viewsQ: UPDATE in all records, changing autoincrement number
I have about 500 records in the database, with autoincrement in a table starting at 900,901,902 onwards, would have like to do an UPDATE on all records starting the autoincrement at number 502? Then…
mysqlasked William Alvares 384 -
2
votes1
answer136
viewsQ: Redirect 301 to specific urls
How do I do in htacess redirect 301 ? But in specific urls, I changed my domain, and migrated the posts for example: meusite.com.br/article/article name meusite2.com.br/article/article name Make a…
-
1
votes0
answers58
viewsQ: How do I style codes?
How do I style a code ? For example: I posted this code on my blog: <?= "Olá :D"; ?> Only it will display normal, like a text, but inside the tag <pre></pre>. But my question is,…
-
1
votes2
answers745
viewsQ: How to format php date, to display 'Today at 00:00' and 'Yesterday at 00:00'?
I have a record in the TIMESTAMP database and wanted to display for example: If the date is current, show: 'Today at 00:00' If it’s yesterday’s date in the bank, display 'Yesterday at 00:00' And if…
-
1
votes2
answers177
viewsQ: Friendly URL in an automated way with all pages
I suffer from this friendly URL business, as I could do for a simple code or any code on. htaccess to make the url friendly in an automated way without me having to write all this: <IfModule…
-
3
votes1
answer2309
viewsQ: How to make multiple checkbox records in the database at once?
How do I make multiple records with checkbox? I need to make multiple records according to my appointment on each checkbox and include in the column id_item the same ID that comes from the variable…
-
1
votes2
answers167
viewsQ: How do I get the autoincrement id without being registered?
Hello, How do I get the id that is autoincrement without the item being registered in the database? Or I’ll have to do 2 process, register the post first, then register the post in the category ? I…
-
8
votes2
answers5121
viewsQ: How to keep the session after browser close?
I log in to my site, but when I close the browser, there is no more session. Then I have to log in again. How do I fix it ?
phpasked William Alvares 384 -
1
votes2
answers762
viewsA: Send email with PHP
Got it, still below the code working! require 'phpmailer/PHPMailerAutoload.php'; $mail = new PHPMailer; //$mail->SMTPDebug = 3; $mail->isSMTP(); $mail->Host = 'smtp.live.com';…
-
-4
votes2
answers762
viewsQ: Send email with PHP
Guys, someone take a step by step of how I do in PHP to send emails, Phpmailer or mail(), whatever, sending the email matters, I’ve tried everything and not getting it at all. Here’s the code I’m…
-
4
votes1
answer108
viewsQ: Improve rating script (star rating)
There’s a way to improve this code ? <?php if ($calculation >= 5) { for ($i=1;$i<=5;$i++) { echo '<img src="'.$linkSite.'/img/star1_16x16.png"> '; } } elseif ($calculation >=3…
phpasked William Alvares 384