Questions tagged as 'php'

1
answer

Error mysqli_connect (): (HY000 / 2002): php_network_getaddresses: getaddrinfo failed: Unknown host

I am in my first steps of programming in PHP and I find this error . This is my configuration file This is my connection file This is the error that comes to me in the navigator. Warning: mysqli_connect(): php_network_geta...
asked by 15.12.2017 / 02:05
1
answer

Automatically generate routes with laravel

Well I have a database that contains some tables, which are:    -Category.       -Subcategories. What I want to do is that if I add a new category, I do not have to place a new route, but it will be automatically generated by the databas...
asked by 22.01.2018 / 14:08
1
answer

Pass data from javascript to php using ajax when reloading the page

Good. I have the following code: <head> <script src="./jquery-latest.min.js"></script> <script> var jash = window.location.hash; var url = "datos.php"; $.ajax({ type: 'POST', url: url, data: {tuVariable:jas...
asked by 23.01.2018 / 01:53
1
answer

Relationships without id in Laravel

Good morning. I would like to relate two tables in Laravel, from the models, without using the id field. That is, I have a table with a common field, which is not an ID. And I would like to relate them. table 1 field 1 field 2 field a - &g...
asked by 21.12.2017 / 17:30
2
answers

Delete in Laravel 5 MethodNotAllowedHttpException '

I'm trying to delete a post in Laravel and I get Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException So I have my delete button <div class="col-md-6 text-right"> <form method="DELETE" action=...
asked by 21.12.2017 / 21:07
3
answers

Problem with jquery Notice: Undefined index

Good morning I have a problem with the combobox and the jquery , the event is not "activated" from the drop-down menu (I have 2 dependent menus mark-> model) script that is in the html head <script language="javascript" src...
asked by 21.12.2017 / 20:18
2
answers

Problem creating friendly URLs with htaccess and regular expressions

Greetings, I am creating a dynamic web page in which certain information is loaded using a variable $_GET . and the url remain of the type https://www.dominio.com/deals/deals.php?deal_id=483 where the variable deal_id...
asked by 22.12.2017 / 19:16
1
answer

How to read a JSON that is sent from a webservice on Android?

Hi, I have a php file in a hosting, this file consults and returns the data through a JSONArray. $idusu=$_GET['pkusu']; $pass=$_GET['passw']; if($_GET['opc']=="1") { $sql="consulta..."; $r2=mysql_query($sql) or die(mysql_error()); i...
asked by 09.12.2017 / 02:03
2
answers

My Joomla website does not run the index.php and instead of displaying the content of the site when accessing the domain, download the index.php file

By entering the website I download the index.php instead of showing the content of the site. I am using joomla and this is the content of the index. <?php define('JOOMLA_MINIMUM_PHP', '5.3.10'); if (version_compare(PHP_VERSION, JOOMLA_MIN...
asked by 09.12.2017 / 23:04
3
answers

Paginate a mysql table with DataTable

I have a table that brings mysql data in PHP, and I have the DataTable Scripts, but it does not page the table. What should I do to get the table, Thanks in advance. <table> <head> <meta charset="utf-8"/> <meta htt...
asked by 26.01.2018 / 15:08