Questions tagged as 'php'

1
answer

Use {{asset ()}} in an echo

I have the following problem: I need to make a query of images saved on the server to show them in a view echo "<img src={{asset ('images/producto/{$producto->imagen}'}} title='{$producto->imagen}'/>";     
asked by 05.10.2016 / 19:28
1
answer

Error in a form that connects to a database on phpmyadmin

Everything is fine, but the moment I press the save button I get the following error:    Fatal error: Call to a member function save () on a non-object   in C: \ wamp \ www \ form \ form.php on line 18. I leave the codes: <?php inclu...
asked by 10.10.2016 / 07:51
1
answer

How to avoid loading the data of the user logged on the user.php page?

I have two pages, perfil.php and user.php , profile.php opens when I log in with my user and I enter my profile and user.php is when I search by user name and it takes me to the profile of the searched user. How do I prevent the...
asked by 09.11.2016 / 16:24
2
answers

Read xml obtained by nusoap in php

I am learning to perform webservice with SOAP and for this I used the library nusoap . Everything is correct, the only problem is that I do not know how to deal with the xml once I get it, because it has a format like this: <...
asked by 15.11.2016 / 09:50
3
answers

Autoload settings

I have to implement the Autoload class in my project with the spl_autoload_register function. As it did not work, try to try it in a simpler code. I have three folders in my mini project: One call Config, where is the class AUtoload.php <?p...
asked by 07.11.2016 / 20:56
3
answers

Enable href depending on the user with session started for certain permissions

I need to enable a href to a certain user role using sessions. For example if X user has the active session. Example: if($_SESSION['usuario']=="X") enable you to open a league eg <a href="#gerencias.php">Gerencias Administr...
asked by 04.11.2016 / 20:53
1
answer

How does strcmp work in PHP?

I would like to know how strcmp works in PHP, since I have a doubt as to the result it throws, I know that when it is compared and they are equal it will result in 0, but in other cases the result varies a bit (1, -1 , 5,45 etc.), which would be...
asked by 09.04.2017 / 23:28
3
answers

Send a multidimensional associative arrangement through the use of forms

From a form like this: <form action="action.php" method="POST"> Foo: <input type="text" name="foo"><br> <input type="submit" value="Submit"> </form> We know that to classically access the info...
asked by 17.06.2016 / 17:21
1
answer

How can I rotate this hexagon, without rotating the image?

How can I rotate this hexagon, without rotating the image. I would also like to know how to resize the image already generated, so that both the hexagon and the image change in size. This is the script I use. <?php // doge.jpg is a squar...
asked by 17.06.2016 / 21:42
1
answer

Ajax PHP - ParserError "Unexpected token in JSON at position 0"

I'm trying to make a GET request with ajax and PHP, but I always get the following error: text status=:parsererror, error thrown:=SyntaxError: Unexpected token < in JSON at position 0 My ajax request is as follows: $.ajax({...
asked by 29.09.2016 / 04:59