Questions tagged as 'php'

1
answer

Pass variables to the Laravel view 5.7

I tell you I am trying to pass the data of an array to a view but I can not specify this is the controller code $lists = array(["name" => "Cerchas", "status" => "1"], ["name" => "Ventanas", "status" => "...
asked by 13.12.2018 / 16:49
3
answers

Rotate php array position

Basically I have to move a position of the array (the position 0 to 1, the 1 to the 2, so on until the last position that moves to the first) Example: Array = 1/5/7/9/14/12 Change of position = 12/1/5/7/9/14 The variable $ num, I use to know the...
asked by 13.12.2018 / 16:07
1
answer

Problems with PHP: password_verify ()

I have a problem with password_verify() , apparently it is not comparing the password and the hash, no matter what I do it always results in error, my code is as follows: try{ $base = new PDO("mysql:host=localhost; dbname=usuarios","...
asked by 25.09.2016 / 18:40
1
answer

change database before starting session

good afternoon the truth I hope you help me and thank you very much for any comments in the main of yii the database is configured. but I would like to select which Database I want to enter without needing to go to main o...
asked by 01.10.2016 / 18:05
2
answers

PHP: How to pass variable id

Result:    Notice: Undefined variable: cat in C: \ xampp \ htdocs \ DSagredo \ forums.php   on line 18       Notice: Undefined variable: cat in C: \ xampp \ htdocs \ DSagredo \ forums.php   on line 20       SELECT * FROM forums WHERE idcate...
asked by 22.09.2016 / 14:14
1
answer

Add text as a watermark to images;

I have this little form where I want to select an image, it appears on the screen with a text like type watermark. <form name="formulario" method="POST" enctype="multipart/form-data"> <input type="file" name="archivo" value="" /...
asked by 27.12.2018 / 16:47
1
answer

Chrome with auto-refill, change the value of a form

I am showing a form for data maintenance and, at least in one field, I see for instants e, value that I publish, but, automatically Chrome crushes it with another value. In the image that I share, you can see that I indicate a value, for a field...
asked by 28.12.2018 / 07:29
1
answer

Show laps of a for in time intervals

The following is more than anything a query. We have a simple cycle: for ($i = 1; $i <= 10; $i++){ echo $i."</br>"; } As we already know at the time of executing this code, all the results will be displayed once and in this case...
asked by 27.12.2018 / 21:02
1
answer

avoid anchor tag behavior

Hello, I have a system that by clicking on a link, it verifies if the user is logged in and depending on this the link changes; it works well but if the user is not logged in yet he enters the section and then quickly redirects to the page I wan...
asked by 10.12.2018 / 04:15
1
answer

php headers excel number format

I need help printing numbers with a decimal when it comes to thousands when generating an excel with php. What is happening is I want to show only a decimal when printing the sheet, but it happens that having numbers of thousands, for example, 1...
asked by 11.12.2018 / 13:57