Search Result

Collapse
48 results in 0.0027 seconds.
Keywords
Members
Tags
variable
  •  

  • tralynn
    started a topic csv columns into variables

    csv columns into variables

    hello,

    I have a csv file that has 13 columns. Some columns are filled, some are blank. What I need to do is pull up the csv file, read the columns into a list or array and then put each column into its own variable that can be referenced in an email script that I've already written.

    Here is my code so far where my output is all of my columns but I'm stuck after this. Any help would be greatly appreciated!

    ...
    See more | Go to post
    Last edited by bvdet; Jun 19 '12, 02:57 AM. Reason: Add code tags

  • Solemn
    started a topic StreamRead/Write filename issue.

    StreamRead/Write filename issue.

    in this example:

    Code:
    using (StreamWriter sw = new StreamWriter("D:\\BrugerID.txt", true))
    I want the "BrugerID" to be replaced with a variable. The variable should be a user input.

    In my perfect dream world the lines should be like this:

    Code:
    string fileNameToWrite = Console.ReadLine();
    using (StreamWriter sw = new StreamWriter("D:\\{0}.txt",fileNameToWrite, true))
    ...
    See more | Go to post

  • ammyra91
    started a topic assign many attribute to one function
    in PHP

    assign many attribute to one function

    Hi evryone....
    i need you help in this coding....
    i named this page search0.php.... .
    this is my code....


    Code:
    <?php
    include("dbconn.php");
    $dateday = $_POST['dateday'];
    $datemonth = $_POST['datemonth'];
    $dateyear = $_POST['dateyear'];
    
    
    $sql= "SELECT * FROM staffactivity WHERE dateday = '$dateday' AND datemonth = '$datemonth' AND dateyear = '$dateyear'";
    ...
    See more | Go to post

  • tharindu96
    started a topic Error in $Filename_or
    in PHP

    Error in $Filename_or

    Can anyone tell me this code works. I'm getting an error

    Code:
    <?php
    
    $filename_or = 'image.jpg';
    $filename = rand(1000,9999).md5($file_or).rand(1000,9999);
    
    echo $filename;
    
    
    ?>
    See more | Go to post

  • starlight849
    started a topic Getting around the percent sign.
    in Perl

    Getting around the percent sign.

    This has been solved

    I am passing a variable that needs to be evaluated with a print command. An example of my variable may look like this "variabl%e"

    I understand that the best way to get around the percent problem would be to simply add another percent sign to the variable and then it would evaulate out to one percent.

    Is there an option in the print command printf that will handle this without...
    See more | Go to post
    Last edited by starlight849; Jan 16 '12, 08:46 PM. Reason: Solved

  • mohangauns
    started a topic Bad variable error while using arrays

    Bad variable error while using arrays

    when i read values from user in an array, It displays Bad Variable error.
    code is given below.
    Code:
    count=0
    while [ $count -lt $n ]
    do
     read arr[$count]
     count=`expr $count + 1`
    done
    where n is maximum number of elements in an array.
    See more | Go to post

  • How to set the name field in a HTML tag as a PHP variable?

    i have this code here (simplified it a bit for this but you get the idea!) and i have assigned the name field of a select tag with a value of a variable so that when i click the Update button i can use _POST[name_var] to get the value of the select. however this returns the following error:

    "Notice: Undefined index: 62"

    if i manually put 62 in the name field and in the _POST[62] it does work so there is no problem...
    See more | Go to post
    Last edited by Ollie Shotton; Nov 11 '11, 03:14 PM. Reason: code little wrong! :P

  • Jay Samson
    started a topic change a variable thru a dialog box

    change a variable thru a dialog box

    How do I change a variable thru an entry dialog box in tkinter or python, as x = 1 and the user changes it to x = 2?? I can't seem to find the answer.
    See more | Go to post

  • php send email with variables pulled from POST form

    I can't figure out why this page doesn't work. It pulls from a html page that is set to POST when the submit button is clicked but I receive an error saying that the page may be configured incorrectly?
    What did I do wrong? I think it may have something to do with putting $_POST in the variables but I don't know for sure.
    Code:
    Thank you <?php echo $_POST["name"]; ?> for registering for the Office Equipment Smash event!
    ...
    See more | Go to post
    Last edited by jhardman; Aug 9 '11, 03:28 PM. Reason: Accidentally posted in asp forum. Moved to php.

  • Laura Wilkinson
    started a topic Cin user option to variable.
    in C

    Cin user option to variable.

    Hi,

    I was just wondering if you could help me. I would like the user to select "Y" or "N" as to whether their motorbike has a sidecar and then store this answer into the variable.

    Could you please help me adapt this;

    Code:
    cout << "Sidecar (Y/N): ";
    motorbikeSideCar=getche();  
    		
    if (toupper(motorbikeSideCar) == 'Y')  
    {
    ...
    See more | Go to post

  • Dan Gaffey
    started a topic Using a variable in a hyperlink
    in PHP

    Using a variable in a hyperlink

    I'm trying to wite a code that can take a web address from a variable and out it into a hyperlink.

    This is what I have so far:

    Code:
    // display the results returned
      
      while ($row= mysql_fetch_array($result)) {
      $title = $row["song_name"];
      $artist = $row["artist"];
      $genre = $row["genre"];
      $SongID = $row["SongID"];
      $Buy = $row["purchase_link"];
    ...
    See more | Go to post
    Last edited by Dan Gaffey; Apr 6 '11, 05:32 PM. Reason: Missing code tags

  • nithinkolekar
    started a topic textbox data not available in post variable
    in PHP

    textbox data not available in post variable

    I am trying to code a form that has multiple textbox without refershing page using ajax, then after each textbox threre will be link called add which POST call the other php called addnew.php.

    In addnew.php data will we added to database(postgr es). But I am geting problem while getting the post variable itself.For testing I added the alert in script.

    this is my code for form (I will chage for multiple textbox once it...
    See more | Go to post

  • Tyler Harder
    started a topic Dynamic Variable gets an Array Value
    in PHP

    Dynamic Variable gets an Array Value

    Hello,
    I'm having some trouble creating a dynamic variable that will load an array value:

    $this_content_j son["content"][0]["popularity "]

    When I use the above line 'hard coded', it works. But when I use the code below as a dynamic variable, it fails:

    ${ 'this_content_j son["content"][0]["popularity "]' }

    Any help would be muchos appreciados....
    See more | Go to post

  • Create variable for each iteration of a for loop

    Hello, I am using a for loop to iterate through an array and need to assign each iteration to a new variable, such as

    Code:
    arr = ['bread', 'milk', 'cheese']
    for i in arr:
        print i
    but instead of printing i, I want the for lopp to assign each iteration to a unique variable, so that when the for loop completes

    Code:
    var1 = 'bread' 
    var2 = 'milk'
    var3 = 'cheese'
    ...
    See more | Go to post

  • mathilin
    started a topic Variables as table names

    Variables as table names

    Hello,
    I have a database that asks the user for many inputs and stores them in variables. From these variables a table name is created. Like so:

    Code:
    'Specify table name
        Set tbl = dbs.CreateTableDef(userCircuit & "-" & userStart & "," & userEnd)
    Where userCircuit, userStart, and userEnd are all variables. I am attempting to add information to this table that is created...
    See more | Go to post
Working...