Questions tagged as 'php'

1
answer

Loop PHP counter with a foreach

I have this code that generates a list of the best rated posts and works perfectly. echo "<div class='col-md-10'>"; echo '<ul>'; foreach ($posts as $post) { echo "<li class='f$post->ID'><a href='".get...
asked by 27.09.2018 / 02:09
1
answer

How to keep the file name when downloading it?

I have a small problem with the name of the files when they are downloaded. So I release them public function expensesAndTravel(){ $file = storage_path() . '\app\excel\REPORTE DE GASTOS Y VIATICOS.xlsx'; $headers = ['Content-Type' =>...
asked by 25.09.2018 / 13:11
2
answers

Work with three arrays and insert with PHP in MySQL database

I have the following code: foreach ( $_POST["num_cod"] as $num_cod) { echo $num_cod; } foreach ( $_POST["fec_cod"] as $fec_cod ) { echo $fec_cod; } foreach ( $_POST["nro_oper"] as $nro_oper ) { echo $nro_oper; } Wher...
asked by 20.09.2018 / 14:50
1
answer

Pass value in PHP

I have this html which collects data from a post that is done in a .php before <input type="text" class="form-control" name="div" value="<?php $division = $_POST["createDiv"]; echo $division;?>" placeholder="" disabled> In...
asked by 20.09.2018 / 10:14
1
answer

Run php every so often without ajax

Good day !!! I have a question, is there a way to make a function run at certain times but without ajax? I mean, I have to make a request to a web with a web service, the issue is that you can not do more than 100 queries a day, the page must be...
asked by 19.09.2018 / 11:12
1
answer

How can I give css styles to this form

How can I give css styles to this form? Is there a better way to create forms in codeigniter 3? <h1>Formulario con Codeigniter 3</h1> <?php echo validation_errors("<p style='background: red; color: #fff'>", "</p>"...
asked by 19.09.2018 / 19:04
2
answers

Query with MySQL Options

I am working in a search engine where I can have two search options. The question is in how I do to make the query according to the values that the selection has. <select> <option>Selecciona una Opcion</option> <op...
asked by 11.10.2018 / 19:32
2
answers

How to save columns of an HTML table in an array?

I have a little problem with a project that I'm working on. It turns out that I need to capture the data from an html table that the user creates dynamically and when I click on "Save data" I need to save them in an array This is my table:...
asked by 11.10.2018 / 12:51
2
answers

unsafe site SSL certificate

Good day, I have a problem with my page, install my site in a VPS and add an SSL certificate and it works but before entering the message "SITE NOT SURE" someone knows what is due? my site is this     
asked by 14.10.2018 / 00:29
1
answer

Problem method GET php when reading a file txt xxx.php? txt = file.txt?

Hi, I'm asking this question since I'm a bit stuck with GEt php, I know I want to read, not download a txt, either with url externna, I'm new to php, I still struggle a little to understand. I want to create urls like this xxx.php? Link = link...
asked by 25.10.2018 / 21:34