Questions tagged as 'php'

2
answers

Get user id

I would like you to help me I am making a mobile application and I have two tables in my database one called "users" and the other "activities" inside this second table I have a foreign key of the user id, what I want is get the id of the logged...
asked by 18.09.2018 / 06:22
1
answer

error when deserializar (csharp - Xamarin) a json (php)

Classes public class Usuario { public string id { get; set; } public string nombre { get; set; } public string nick { get; set; } public string password { get; set; } public string email { get; set; } } public class T {...
asked by 15.10.2018 / 17:25
1
answer

Get the key of a JSON in PHP? (Not the value but the key)

I have a JSON Object that sent it from android to PHP it's similar to this {"1":"insert 1", "2":"insert 2", "3":"insert 3" } the number is the id of the record and the insert is a sql instruction that is executed to save values in a BASE n...
asked by 17.09.2018 / 16:52
3
answers

Count the variable $ i of a flower cycle

Hello good day I have a cycle so what I need is to count how many items the for example 0,1,2,3,4,5,6 = 7. brings me and get the result that is 7. if (isset($_SESSION['carrito'])) { $datos = $_SESSION['carrito']; for ($i=0; $i < count($...
asked by 10.09.2018 / 11:43
1
answer

receive array in php

I need to take an array to php to be able to insert it into a table that is in mysql Since Javascript I'm sending it like this var table = $('#tblGrid').tableToJSON({ ignoreColumns: [5] }); JSON.stri...
asked by 13.09.2018 / 12:43
1
answer

work with classes in PHP

I have a little doubt about how to work with classes in PHP if I have a form called request.php and I have another document called clases.php in which I have all my classes. but I do not know how to call my file request.php to the class I hav...
asked by 12.09.2018 / 16:43
2
answers

The global variable does not work for me

Hi, I'm doing a php function to show data from the DB, I have a DB connection variable outside of a function, and the query inside a function, so that in the function 'read' the variable uses global <?php $conexion = new mysqli("","","","...
asked by 13.09.2018 / 09:18
1
answer

capture value of a password type input

Hi, I'm trying to capture the value of an input type password, but I could not is a form to edit user profiles, then I bring the name and email from the database, but I do not bring the password, because I want to put a new password and send...
asked by 04.12.2018 / 08:53
2
answers

How to perform an operation of subtraction multiplication and sum automatically in html

<tr> <td> <label class="title">Chocolate: </label><br> <label><?php echo $ver[4]; ?></label> </td> <td> <input type="hidden" name="ChocolateIn" value="<?php echo $ver[...
asked by 22.09.2018 / 16:38
1
answer

mysql php registration form does not work correctly

I am working with a simple user registration form, they are already inserted, the code HTML <?php include '../includes/insert/insert_usuario.php'; ?> <form class="form-horizontal style-form" method="post"> <div clas...
asked by 28.09.2018 / 16:21