Questions tagged as 'variables'

2
answers

insert variable JS in html

I would like to pass the value of the variable visits of the document ready to the html code of <li class> $(document).ready(function(){ visitas="active"; }); <div id="cursor"> <ul clas...
asked by 03.07.2018 / 10:40
2
answers

Can a variable be used in different loops?

I know it's very basic, but I just started with programming. It would be about c #. I want to count down from a number to 0 using 3 different loops that are in the same method (button1_Click). Can I use the and as a variable for the 3 loops?...
asked by 12.11.2018 / 00:33
3
answers

what is the int opc for? in c ++? [closed]

#include <conio.h> #include <stdio.h> int main( ) { int opc; // <- porque el termino opc? printf( "\n Por favor introduzca un numero del 1 al 7 considerando 1 como lunes " ); scanf( "%d", &opc ); switch( opc ) { ca...
asked by 05.11.2017 / 01:31
3
answers

PHP echo variable does not work in jQuery

I was reading by stackoverflow in English the way to receive in jQuery the value of a PHP variable and I found this way: $(document).ready(function(){ $(".topic").click(function () { var postId = "<?php echo $post[\'id\']; ?>...
asked by 21.03.2017 / 05:36
1
answer

System.NullReferenceException: 'Object reference not set as an instance of an object.' [duplicate]

I would like if someone could help me with the following question. I'm doing a test program in which there is a textbox in which names are inserted, these names must be saved in an array and then pressing another button that those names go to...
asked by 05.11.2018 / 21:43
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

How to store variable in JavaScript until reloading page?

My question is based solely on whether there is the possibility of entering a variable through a prompt() and that it is saved no matter how many times the code is run afterwards, and it is deleted only when the page is reloaded or manual...
asked by 12.08.2018 / 07:22
3
answers

Convert local variable to global. PHP

I am trying to collect the fields from a MySQL registry, and for this I use the following: $reg = mysql_query("SELECT * FROM draws WHERE urlID='$urlID'"); while($data = mysql_fetch_array($reg)) { $title = $data ['title']; }...
asked by 20.05.2018 / 09:54
1
answer

Assign variables from string entered by keyboard in C

I need to achieve the following: The user will enter the following command by keyboard: cousins entry.txt -t -n 5 Where cousins is the exercise, input.txt a file that contains numbers, -t to indicate that threads will be created, a...
asked by 04.11.2017 / 16:17
1
answer

UPDATE variables and data in PHP and MySQL

I need to save a path of an image in my code, in case the user does not want to modify the image when modifying a product. The current problem is that it sends blank and modifies the url of the image in the database <?php session...
asked by 17.08.2017 / 00:37