Questions tagged as 'php'

2
answers

How to remove scripts from a text string in PHP?

I have a question,    How can I delete the - scripts from a text string? I did the following but it does not work for me. $cadena = "Mi-cadena-con-guiones"; $cadena = preg_replace('[\s+]',"", $cadena);     
asked by 22.04.2017 / 04:57
2
answers

PHP single quotes in an echo

I want to show the single quotes within echo $email = "[email protected]"; echo 'mail->addAddress('.$email.')'; It has to come out like this: mail->addAddress('[email protected]');     
asked by 23.05.2017 / 09:50
1
answer

Problems showing some special characters [closed]

My problem is that in a management panel you must show domains, users and passwords. The case is that the passwords have special caraacteres, among them < and > . And when it comes to showing everything between those character...
asked by 02.10.2018 / 11:38
2
answers

Input type File exceeds bytes in PHP

If I upload a small audio file (15sec) it works fine, but when I do it with a song (4min) it bursts: Warning: POST Content-Length of 9042845 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 In the view:       <h2>Agreg...
asked by 28.02.2018 / 23:58
3
answers

Problem when printing PHP array data

I have a problem in the following code, I am trying to print the data 'notes' of the array with 'foreach' but when printing with 'echo' it prints the word 'Array' and does not print the data I want. $persona1 = [ 'nombre' => 'nombre1',...
asked by 30.11.2018 / 12:38
2
answers

Why do I get an error with br /? [closed]

session_start(); <br /> //esta es la linea 5 <form method="post" action="?"> <table border="1" cellspacing="0" cellpadding="5" align="center" > <tr> <td>Ingrese su nombre de usuario</td> <td><input ty...
asked by 19.10.2018 / 19:08
3
answers

SQL does not host data

For the following problem I have as an object practice to send a form to MySQL; my code, which is by the PDO method, does not mark errors. So when I fill in the fields, when I run the code, the machine tells me that the insertion of data was cor...
asked by 19.10.2018 / 00:06
2
answers

Error inserting data in mysql

<form name="datos" action="TP 371 Orangel.php" method="post"> Nombre:&nbsp; &nbsp; <input type="text" size="15" pattern="[A-Za-z]{3,}" name='nombre' id='nombre' required><br><br> CI/RIF:&nbsp; &...
asked by 08.11.2018 / 13:14
2
answers

I can not connect to the database

I have this code: <?php class Conexion { private $host = "localhost"; private $user = "root"; private $pass = ""; private $bd = "nutricion"; private $con; public function Conectar() { $this->con = mysqli_...
asked by 20.04.2018 / 19:32
4
answers

How to compare a variable several times with a =

What the title says, I'm doing a project and in a specific part I want to add 1 to the value of a variable, I hope that with the code they understand my doubt $resultado = $_POST['resultado']; Suppose that the value sent by the form is 10....
asked by 26.04.2018 / 21:01