Hi, I wonder how to sum two variables, for example:var newprice = price1 + price2;$j('div.price_product').append(newprice+' $');It returns just "Price 1 + Price 2" - it doesn't sum these variables. ...
i got it - to store one variable in a session(the id's of items) with:$_Session['item'] etc., the I work with serialize and unserialize to aggregate new values. All is stored in a string. How can I store two variables in an array? Sayingthe item id and the quantity? How would be the code? ...
My question is if it possible to save two variables in one select method, and post both of the variables on submit.Example, if a user will choose Math in the following code, I want the value of category to be posted, but I want to send another variable, let say name="mathb", with it. is it ...
How to set two variables in one declaration, inline style:<body style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt;"> and<body style="background-image: url(http://site/images/picture.jpg); background-repeat: no-repeat; background-position: right bottom ...
I have this instruction:if(isset($variable)) Can I make it so the "if" instruction is only carried out when two variables are set, instead of one (($variable)), if so then how do i do it? ...
I am new at PHP and trying to append two variables (which both contain text and then truncate them to 10 characters (from the front)I have searched the forums/manual and tried with ; without; and various other permutations.Can any one tell me why I cannot get the variables to take the value on the r ...
I am combining two variables into one variable like this.$allids = $theids . $comma_separated2 ;What I am getting istheidscomma_separated2What I need istheids,comma_separated2How can I add a comma between the two variables? ...
I wrote the function shown below to randomly pick a banner image and the matching sponsor link. My experience so far, which is very basic, only allows me to return one variable, but from this function I want to return two variables, "rand_banner_tour" and "rand_sponsor_link". Is ...
Comparing two variables --------------------------------------------------------------------------------Script#!/bin/shhardware=PCos=WindowsNETfor i in `cat newservers`dox=`sudo /opt/openv/netbackup/bin/admincmd/bpplclients |grep $i |head -40 |grep $i|awk '{print $3;exit}'`if [ "$i" -eq ...
I want to store two variables in an array or list in a loop to collect all my x an y, something like the append function in python, can anyone help me. ...
I've been learning bash scripting, and trying some basic stuffs. Just came across a situ where I have to execute a command, where attributes should be from each line of 2 files. file1 and file2.I guess it can be done with for and while loops. Is there a way to use multiple variables in a single line ...
Use the program, Passing-by-value, on the bottom of pp. 248–249 and the program,Passing-by-reference, on pp. 255–256 as a starting point for this assignment. Write a similar program, but change the code to pass two variables to the function call rather than one.that's my assignment and i have tr ...
I'm having some troubles passing through two variables through the browser and it working quite right. I'm kinda miffed on this one and hopefully someone can see what i'm missing.When I print out the variables on the deletepicture.php page, using the following print statement://DEBUG STATEMENTprint ...
I want to be able to have a script that can handle two variables, like the link below.http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=77My current script can handle only one variable, <? if (!$p) {$p=""; } include("/web/sites/279/sesgalaxy/www.sesgalaxy.f2s.com/$p. ...
I am trying to edit this program to pass two variables to the function call using a passing-by-reference. I need help as to how to modify what I have. Any help would be appreciated.#include "stdafx.h"#include <iostream>using std::cout;using std::endl;int incr10(int& num); // Decl ...
I need to get the difference (in minute) between two variables of type DATE.Example:DATE d1; // 12/12/2002 12:10:20 AMDATE d2; // 11/12/2002 11:10:20 AM ...
Turns out I don't have bc in my Ubuntu distro and I can't install it. Can someone help me subtract two variables (BASH variables) from awk and set the result as another variable, e.g:finalvalue=`awk '{print $first - $second}'` ...
I wish to create a url with two variables from data passed from a previous page.If I allocate text to the variables on the page, like $linkaddress = ('1234');$clientsemail = ('olympic@mechan.freeserve.com');the full correct URL is echoed back thushttp://www.morgle.com/mymorglemailer.php?mylinkaddres ...
I've hit a new road block on my VIN decoder page. I want to echo something only if two variables are true.Here's what I want to do:if (($Series == "D") && ($ModelYear == "2")){echo "Skylark";} else {echo "This is not a valid Series";}When I type 4D27H2 ...
any one please help me, i want to know how to swap two variables say, a and b with out using a third vaiable ...
Sorry for the rediculously simple question, but my Super-Duper Sam's book doesn't seem to have the answer, and I'm not doing so well at finding it in the php manual.I'm making a login search script where someone has to enter two characters in one box then a 6 digit number in another box. On the resu ...
I'm trying to compare two variables in my if statement. What I'm wanting to accomplish here is when the user inputs the data, I'm wanting the code to echo "Skylark" if and only if the Series = "D" and the Model Year = "2". If the model year was "3" it would ec ...
Can someone provide the code for adding two variables together and receiving a sum? It's a Dialog box. There are three EDIT boxes, one each for inputting variables x and y and one for the sum output. Float value, large numbers. ...
HelloI'd like to exchange the content of two variables, each containing a string.A="aaa"B="bbb"result:A="bbb"B="aaa"Is the a C-command that makes that directly or is there a temporary variable necessary for the exchange? ...
I was wondering if there is a way to split this string into two variables:environment/glossary.htmso that I can get:variable1 = "environment"variable2 = "glossary.htm ...
To compare two variables that belong to a defined type we must compare all their members or there is another method to do this??How can we pass from a variable defined as string*32 to an ordinar string variable. In other words how can we eliminate the spaces after the word in the string *32 variable ...
I need to check if two variables are not empty for an if, else if, else statement:If I'm correct I think I know how to check one variable:if (!empty($variable)) {//condition} elseif {//condition} else {//condition}However when trying to check two, I tried:if (!empty($variable1)) && (!empty($ ...
i need to check if two variables are diffrent.hopefully in the same way an if statment can check if two variables are the same withif ($var1 == $var2);can i just put an ! in front of one or something. ...
basic question: if I have the following two variables, how can I make the variable $url = "http://www.example.com/directory"$baseURL = "http://www.example.com";$directory = "/directory" ...
I need to assign the same value to two variables is there a way to do this like in some other languages.e.g. I have the following currently:l_test := 'valval'l_counter := 'valval'I want to condense this down into something simpler such as:l_test := l_counter := 'valval'Is anything like this possible ...
I need to pass two variables from a chart to a detailed report? How can I achieve this? ...
HelloIn my sql procedure, I want to do a for loop with two variables having their values from a list of tuples. I don't know the exact syntax to do that, I ve tried as you can see below but it didn't work :DECLARE var1 Number;var2 VARCHAR2(20);BEGINFOR (var1, var2) IN {(1,'a'),(2,'b')} LOOP --syntax ...
i have two variables of type varchar2. i need to swap them using a procedure which takes two variables as arguments and returns them swapped.can anyone give me the complete pl-sql procedure for the same.i am new to pl sql.thanks.Edited by: user12773921 on Mar 9, 2010 8:48 AMEdited by: user12773921 o ...
I generated code:*Java Syntax (Toggle Plain Text)java.lang.System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");SSLContext ctx;ctx = SSLContext.getInstance("TLS");ctx.init(new KeyManager[0],new TrustManager[] { new DefaultTrustManager() },new SecureRandom());SSLContext.setDefault( ...
I'm in some desperate need of help here. I want to know how to be able to combine two different variables into one variable.For example, I have the variable $number_id3 submitted from a form. When I process this form I need to be able to display the value of that variable with something like $number ...
I hope someone can shed some light on what I am needing to do. Just a little guidance should be good...What I have is an app where an employee slides their id badge and a form captures the long string of data from the magnetic strip on the back. I need to take the string that is read and convert it ...
I don't know how to even begin going about this, but it seems to be a fairly simple request.I'm looking for a prompt dialog at a certain page that doesn't check a database for registered users (well that would be nice but is not vital).What it would do is ask for two pieces of information (User name ...
I am able to store the output SDO_GEOMETRY into a variable but i am facing difficulties in extracting ordinates in sdo_geometry to two independent variables say xa, ya. Kindly suggest some solution.The procedure is as follows:CREATE OR REPLACE PROCEDURE fnd_2nd_Point(Input_Fiber_Id IN NUMBER,xa IN F ...
Hi, i have a page that echoes my username at the top of the page, however i want to change it to firstname lastnameAt the top of the page the following code appears:<? echo $_SESSION['user_info']['username'];?>however my firstname and lastname are the following variables. How do output the two ...
okay so im just working pn a simple calculator program, as I am a beginner at c++ and I got the idea while following the tutorial. Here is the code:#include <iostream>using namespace std;int main() {int a;int b;int add;int sub;cin >> a;cin >> b;add = a+b;sub = a-b;cout << ...
Hiis it possible to compare 2 php variables with javascript and hide-show a div according to the result?lets say php variables are $a$band if ($a > $b) show the divcan anyone please help me to do this?Sorry for language errors ...
using php and mysql, is it possible to download more than one variable into a field? Example: Field is FRUIT. The variables would be $apples and $oranges. How would I store both these variable into one field? Is this possible? ...
Please provide me your suggestions for helping me in this below query,I would like to add two union statements and deliver the results as one resultset.The query is as followsselect SUM(ctx3.receipt_no) FROM (SELECT count(distinct(ctx1.receipt_no)) as receipt from ipadmin.counter_txn ctx1 where ctx1 ...
I am having a problem and cannot figure out why the values of two vairables are not being passed to a function to retrieve a map for a foreign city and countryit shows this error:Warning: file_get_contents(http://site.mysite.com/spmp/MPClient?type=poi&SRC=sp&input=rome&country=italy) [fu ...
I am running into a small problem. i would like to pass two variable in a hyperlink. here is the part of the script that seems to have a problem as no values are actually passed to the next page when following the hyperlink.$dbcnx=@mysql_connect("localhost","root","jan1971te ...
I am having problems finishing a code at the top of a secure page that will make sure that no two users are logged in at the same time. My if statement seems struggling. Wonder if someone can take a look. I have a feeling it is failing when comparing $currentsid and $dbsid.<?phpsession_start();// ...
I'm trying to order a query by two keys. For instance ... the first key is percent relevance (percent_rel), the second key is date_submitted. In any group of selections there will be many that have the same percent_rel, when there is I want those within that group ordered by date.Right now my statem ...
I have the following code where users can select what size apartment and what location, but how do I write the query that selects the variables?here is the form:<p><table><tr><td><FORM method="post" ENCTYPE="MULTIPART/FORM-DATA" action="/results.ph ...
I have a small calculation procedure, that received a record ID from whereever it is called.Until now, it would just return a single variable (currency type) but now I need it to return to separate currency variables. Can this be done? or would I have to return an array or something instead? ...
Could you take a look at this code for me please and see if you can spot anything wrong. I'm guessing my syntax is incorrect somehow because if I use just one variable it works fine - it is when I try to put the AND bit in the query (or maybe where i echo the rows?). If the page URL looks like this: ...