Questions tagged as 'php'

2
answers

Problem when saving record in database with PHP7

I am using PHP 7 to enter records in a database. It says "full subscription" but I check my database and I do not have any data saved. Where this error? And how can I solve it? This is my registry.php file <?php $db_host="localhost"; $db...
asked by 22.07.2016 / 22:19
2
answers

How to rename a mysql table in php?

What I want is to rename a table from php. I have tried with this: mysql_query("RENAME TABLE ". $tablaNom ." TO '.$nombre.'") or die(mysql_error()); The previous line renames me the table but it puts a "." in the name and when I want to mak...
asked by 14.07.2016 / 20:15
1
answer

Compare dates in Laravel

I have a table called Input, which has these parameters: public function up(){ Schema::create('entradas', function (Blueprint $table){ $table->increments('id'); $table->date('fecha'); $table-&g...
asked by 18.02.2018 / 12:50
2
answers

Assign value to the dynamic jQuery element

I have the following for where I try to fill a dynamic input text, the question is that I do not know how to assign the path value of for to be able to fill them correctly: for (var j = 0; j < respuesta.length; j++) {...
asked by 19.02.2018 / 22:09
1
answer

Show two data of the same table in different INPUT

I have a table ARTICLES that has two fields: the first Article (whole number) the second Description (varchar) In my system I show a select with all the records of the table ARTICLE By selecting I'd like to: A textbox that I have...
asked by 19.01.2017 / 04:56
4
answers

Error in undefined variable PHP

What a good day, I have the following code in PHP: <div class="wrap"> <form id="ContactForm" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="POST"> <label>Asunto:</...
asked by 08.04.2016 / 19:02
1
answer

read .xml files in reverse order

I am generating the reading and writing of files .xml via php, the problem is that they appear from the first to the last one and I want the last ones to be added to be the first to appear. Here is the code: <?php for ($i...
asked by 05.06.2016 / 21:33
1
answer

Calculate expiration date with JS

I want to do a calculation in which I show in input how many days are missing so that an insurance expires, an important point is that I do not have field in the DB to save this information, I show the data in a table by half of a whil...
asked by 02.01.2018 / 17:25
1
answer

Determine the destination of a generated PDF

Good community, I ask for your help again, this time it is about the generation of a PDF document with the mPDF library. The query is as follows: How do I determine the destination of my PDF generated? That is, I know that when the...
asked by 27.12.2017 / 23:38
3
answers

How to list start and end dates of a specific week

What is desired is the following, a function that receives as a parameter, the week number of a specific year and returns the date on which it starts and ends that week. for example function weekStartEnd($weekNumber,$year){ $firstDateOfWeek=...
asked by 29.12.2017 / 00:14