Hello,  I am trying to insert a variable into php statement.

Hello, I am trying to insert a variable into this statement.
Variable name is $stable
<?php echo 'includes/   $stable  .php ';?>

The above concatenation is my preferred method but the easiest to read is to use double quotes and curly braces:
<?php echo "includes/{$stable}.php"; ?>
There is a slight performance hit this way but on a small project it shouldn't make any difference.

Similar Messages

  • I am trying to insert a disk into my cd drive, but it wont take it...

    I am trying to insert a disk into my cd drive, but it wont take it... there is nothing in the drive as i can get the disk in up to the point of practically losing it.
    If anyone can help with this I would greatly appreciate it.  I have looked in system profiler and as far as I can see there is no software linking the drive to the MacBookPro.
    Many Thanks.

    You will need to boot from some alternate boot device to accomplish this, if you did not initialize the drive before installing it.
    If you have another Mac, you may be able to use FireWire target disk mode.
    If your MacBook has a DVD reader and you have a Mac OS X Installer/Utilities DVD, such as the one that shipped with it, you can boot from that DVD, answer only the "what Language" question, and wait a quarter minute for the MenuBar to be drawn. Then examine the Utilities menu or the Installer menu and Find Disk Utility.

  • Inserting user variables into MYSQL database using servlet

    I have a servlet that recieves user entered parameters from an html form and inserts them into a user table in MYSQL, or at least is supposed to. I can get it to update the table with specific values but not with the user variables. I know the single quote marks are for inserting specific values but without them it doesn't properly work.
    The parameters are parsed correctly into the variables, so I just can't figure out how to ge tthe variables into the database. Any help would be wonderful
    register.html:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
      <TITLE>Register</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <CENTER><IMG SRC="dvdti.jpg" ALIGN=middle >   </CENTER>
    <HR>
    <H1 ALIGN="CENTER">Please enter your registration details:</H1>
    <FORM ACTION="http://localhost:8080/examples/servlet/Assignment1.register">
      <BR>First Name: <input type="text" NAME="Ufirst_name"><BR>
      <BR>Last Name: <input TYPE="TEXT" NAME="Ulast_name"><BR>
      <BR>Address: <INPUT TYPE="text"  name="Uaddress"><BR>
      <BR>E-mail:     <INPUT TYPE="TEXT" NAME="Uemail"><BR
      <BR>Password: <INPUT TYPE="password" NAME="Upassword"><BR>
      <CENTER>
        <INPUT TYPE="SUBMIT" VALUE="Register">
      </CENTER>
    </FORM>
    </BODY>
    </HTML>
    register.java:
    package Assignment1;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    // Connects to a database to retrieve music data
    public class register extends HttpServlet {
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
    // Database connection code starts here
         Connection conn = null;
         // loading jdbc driver for mysql (help in mysql.jar file in classpath)
         try{
             Class.forName("com.mysql.jdbc.Driver").newInstance();
         } catch(Exception e) {
             System.out.println(e);
         // connecting to database
         try{
              // connection string for demos database, username demos, password demo-pass
             conn = DriverManager.getConnection
            ("jdbc:mysql://mudfoot.doc.stu.mmu.ac.uk:3306/roddiea?user=roddiea&password=");
              System.out.println("Connection to database successful.");
           catch(SQLException se) {
             System.out.println(se);
    // Create select statement and execute it
      try        { Statement stmt2 = conn.createStatement();
              // Get the regdetails from the reg form
               String Ufirst_name = request.getParameter("Ufirst_name");
               String Ulast_name = request.getParameter("Ulast_name");
               String Uaddress = request.getParameter("Uaddress");
               String Uemail = request.getParameter("Uemail");
                  String Upassword = request.getParameter("Upassword");
              stmt2.executeUpdate("INSERT INTO customer(first_name, last_name, address, email, password)" + "VALUES('Ufirst_name', 'Ulast_name', 'Uaddress', 'Uemail', 'Upassword')");
              System.out.println (stmt2);
              out.println(stmt2);
              out.println(Ufirst_name + Ulast_name + Uaddress + Uemail + Upassword);
        // close the html
        out.println("</BODY></HTML>");
              stmt2.close();
             conn.close();
         }catch(SQLException se) {
             System.out.println(se);
    }Message was edited by:
    Altered_Carbon
    Message was edited by:
    Altered_Carbon
    I also realise that this is a more MYSQL titled problem, but those forums look rubbish <_<

    Investigate PreparedStatement.
    Currently you're trying to insert a value "Ufirst_name" instead of the value of the variable called Ufirst_name.
    It's possible to do this (you could do something like this: "... '" + UfirstName + "' ...") but DEFINITELLY NOT RECOMMENDED. Instead use a prepared statement.
    D.

  • Trying to insert CLOB data into Remote Table..

    Hi everyone,
    I think this question had already posted.But i am not able to figure out this problem..
    what i am trying to do is
    I have a table in the remote database with a CLOB column like this
    REMOTE_TABLE
    ============
    REMOTE_TABLE_ID (Populated with sequence)
    REMOTE_CLOB CLOB
    In my Local database i have to write a Procedure to gather some information on a particular record (My Requirement) and save that CLOB in the REMOTE_TABLE.
    I built that procedure like this
    Declare
    var_clob CLOB; /* I need to processs several records and keep all data in a clob
    begin
    /***** Processed several records in a local database and stored in the variable var_clob which i need to insert into remote database ****/
    Insert into remote_table@remote values (remote_table_seq.nextval,var_clob);
    /*** when i try to execute the above command i am getting the following error
    ORA-06550: line 6, column 105:
    PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables
    ORA-06550: line 6, column 1:
    PL/SQL: SQL Statement ignored *****/
    /***For a test i created the same table in local db****/
    Insert into local_table values (local_table_seq.nextval,var_clob);
    It is working fine and i am able to see the entire CLOB what i want.
    surprisingly if i pass some value instead of a varibale to the remote table like the following..
    Insert into remote_table@remote values (remote_table_seq.nextval,'Hiiiiiiiii');
    It is working fine...
    I tried the following too..
    decalre
    var_clob clob;
    begin
    var_clob := 'Hiiiiiiiiiiiiiii';
    Insert into remote_table@remote (remote_table_id) values (1);
    commit;
    update remote_table@remote set remote_clob = var_clob where remote_table_id = 1;
    commit;
    end
    I am getting the following error..
    ORA-22922: nonexistent LOB value
    ORA-02063: preceding line from CARDIO
    ORA-06512: at line 6
    Could someone please help me in fixing this issue..I need to process all the data to a variable like var_clob and insert that clob into remote table..
    Thanks in advance..
    phani

    Go to http://asktom.oracle.com and search for clob remote table
    also docs contain quite lot of info:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_working.htm#sthref97
    Gints Plivna
    http://www.gplivna.eu

  • Inserting Text Variables into ID(CS2)

    I have an old copy of Indesign CS2 that I use on an old Mac portable. (Waste not want not!)
    I am trying to insert the 'modification date' into a document.
    Unlike later versions there is no drop menu button to select this.
    (many old software programs used to have key strokes without drop menu?)
    It is possible to insert the 'modification date' or 'file name' into a ID CS2 document?
    the ID CS2 Help menu is less than helpful.
    Isvara78

    Text variables was not a feature in CS2.
    Bob

  • [IDCS3 WIN Insert Text Variables into a document

    Hi all.
    Please, I need insert a Text Variable into a document.
    This document is not open in a window (I am importing it).
    Using ITextVariableSuite is not possible.
    Any idea, suggestion, way of work,...?
    Thanks in advance.
    Best regards,
    Juanma.

    When you are posting on both the mac and windows forum it would be nice to say so.
    When you are asking questions about the development of plugins, please do so on the appropriate forum: http://www.adobeforums.com/webx/.ee6b334/
    We are all end users here.

  • Still trying to insert my photo into Avery template

    Thank you I was able to turn the background to white.  However I am still trying to figure out how to insert my image into this template so I can then have photoshop manage the color and print it with my Epson 3800 printer.  When I click on the template it says could not complete your request because more than one layer is selected.  This what Avery sent in the download.  Do I have to do this in layers?  I just want to insert the phot and print my images on the postcard templates I bought from Avery.  Anyone get what i am asking?
    Thanks,
    Andrea

    Andrea,
    It is very poor netiquette to start a duplicate thread for the same issue you're discussing elsewhere:
    http://forums.adobe.com/message/5246034?tstart=0#5246034
    It causes confusion and wastes time and efforts of other users.
    No, your question is not clear because you have given us almost no information and have not provided pertinent screen shots.  The terminology in the description of your problem is far from clear.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • I am trying to insert a logo into my photography.I keep getting a message that says "no options for Lightroom identity plate"

    I keep getting a message that says "no options for Lightroom identity plate" I just want to insert my photo logo. Please help

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    For Mac OS X 10.4.11 or Mac OS X 10.5.8 you can look at:
    * http://www.floodgap.com/software/tenfourfox/
    Firefox 3.6.x can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

  • I am trying to insert a PDF into dreamweaver.

    I have the PDF's on the right hand side of my screen already in dreamweaver.  How do I get them into dreamweaver?  I have exhausted all my options

    Are you working from a properly Defined Site in DW?
    GS-01: Defining a new site | Learn Dreamweaver CS5 & CS5.5 | Adobe TV
    If you are, your PDFs should be in your local files before they're ever uploaded to the server.
    If they exist in your local Defined Site, all you need to do is...
    1. Highlight the text you want to use as the links in Design View
    2. Browse (click the folder icon by the Link field), point (click and drag the point to file crosshair by the link field to the PDF in the Files window) or type in the path of the PDF to the Link field of the Properties window.
    3. Save
    4. Upload both the modified page and the PDFs

  • I am trying to insert a "Counter" into my web page

    I have been using Adobe PageMill 3.0 since the mid 90's with great success until my contracted server changed, and I needed to upload all 1500 files all over again. The only problem I'm having is getting a "counter" to work. I have all sorts of script, but nothing seems to work. Any suggestions out there?

    I've been using http://www.sitemeter.com/ it has a free counter with web statistics that you can plug in the raw source of your pages.

  • Issue with getting flash variables into PHP to mail

    Hi there,
    Is anyone able to take a look at this forum post and assist
    please?
    http://www.actionscript.org/forums/showthread.php3?t=193471
    Really at a loose end on this one!
    Many thanks.

    Hey Nasia.A.
    Sending information from flash to php, then from php to
    flash is simple once you get the hang of it.
    Tut1
    tut2
    There are thousands of tutorials on the internet. Just google
    -> send data to php from flash or vice versa.
    Good luck!

  • How to insert ORACLE HINT into select statement....

    Hi team,
    Can you please suggest me how to add an Oracle hint to point the Program to BSAD~1.
    Index BSAD1 has all three fields MANDT, BUKRS, AUGDT which are there in the where clause. But as per the execution plan index BSAD0 is being used which is the primary one.
    Also the stats for this table are are current.
    Thanks in Advance.
    Puneet.

    Hi punnet, look at this example:
      SELECT MAX( kkop~augbd )
      INTO it_gen_docs-augbd
      FROM ( fkkvkp AS vkp INNER JOIN dfkkop AS kkop
         ON vkpvkont = kkopvkont ) INNER JOIN dfkkko AS kkko
         ON kkopaugbl = kkkoopbel
      WHERE vkp~exvko = ti_cuentas-exvko
            AND kkop~bukrs = p_bukrs
            AND kkop~blart IN r_blart
            AND kkop~augst = '9'
            AND kkko~blart IN r_blartd
    %_HINTS ORACLE 'INDEX("DFKKOP" "DFKKOP~Z07")'.
    DFKKOP is the table name and DFKKOP~Z07 is the index.
    I hope this helps you.

  • Property Lists: How to insert a variable as a property?

    Hi.
    I am trying to insert a variable in place of a newly defined
    property to be added to a poroperty list.
    This would normally add a new a new property to a poroperty
    list :
    Database [#needtogetvariablehere] = typedPassword
    -- 'Database' is the property list, 'needtogetvariablehere'
    is the new poperty and 'typedPassword' is the new property's value
    - thisall works fine.
    I'd like to generate new property names dynamically using an
    editable text box. How do I replace the new property name '
    nedtogetvariablehere' with a variable?
    I'm sure I've got to put some rounded brackets in somewhere
    but everything I try spits out a syntax error.
    eg:
    myVariable = "blablabla"
    Database [#(myVariable)] = typedPassword
    Any ideas?
    Thanks.

    I don't know of a way, despite the responses so far, to
    convert a variable
    name to a symbol then to use it as a property. You must hard
    code it as you
    have seen in the responses.
    Craig
    Craig Wollman
    Word of Mouth Productions
    phone 212 928 9581
    fax 212 928 9582
    159-00 Riverside Drive West #5H-70
    NY, NY 10032
    www.wordofmouthpros.com
    "dbohea" <[email protected]> wrote in
    message
    news:e7e3p7$mb2$[email protected]..
    > Hi.
    >
    > I am trying to insert a variable in place of a newly
    defined property to
    > be
    > added to a poroperty list.
    >
    > This would normally add a new a new property to a
    poroperty list :
    >
    > Database [#needtogetvariablehere] = typedPassword
    >
    > -- 'Database' is the property list,
    'needtogetvariablehere' is the new
    > poperty
    > and 'typedPassword' is the new property's value -
    thisall works fine.
    >
    > I'd like to generate new property names dynamically
    using an editable text
    > box. How do I replace the new property name '
    nedtogetvariablehere' with
    > a
    > variable?
    >
    > I'm sure I've got to put some rounded brackets in
    somewhere but everything
    > I
    > try spits out a syntax error.
    >
    > eg:
    >
    > myVariable = "blablabla"
    >
    > Database [#(myVariable)] = typedPassword
    >
    >
    > Any ideas?
    >
    > Thanks.
    >

  • Trying to Insert .flv - but skin won't display?...

    I am using DWCS4 and I am trying to insert a song into my webpage. I turned my .mp3 into an .flv and am attempting to insert it using DW, but when I preview in Browser (and also upload the page to server and try to view it) the skin won't show up at all! Does anybody know what's going on?
    Thank you all,
    BTW here is the code that DW inserts, just in case that helps
    "<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="45" id="FLVPlayer">
        <param name="movie" value="FLVPlayer_Progressive.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="scale" value="noscale" />
        <param name="salign" value="lt" />
        <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Corona_Skin_3&amp;streamName=../music/Sade _Smooth_Operator&amp;autoPlay=true&amp;autoRewind=false" />
        <param name="swfversion" value="8,0,0,0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="../Scripts/expressInstall.swf" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" width="800" height="45">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="scale" value="noscale" />
          <param name="salign" value="lt" />
          <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Corona_Skin_3&amp;streamName=../music/Sade _Smooth_Operator&amp;autoPlay=true&amp;autoRewind=false" />
          <param name="swfversion" value="8,0,0,0" />
          <param name="expressinstall" value="../Scripts/expressInstall.swf" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>"

    Hi
    Can you post a link to the site?
    Also your file structure should look similar to the following (change the flv, skin and html page names to match yours).
    PZ

  • How do I insert multiple values into different fields in a stored procedure

    I am writing a Stored Procedure where I select data from various queries, insert the results into a variable and then I insert the variables into final target table. This works fine when the queries return only one row. However I have some queries that return multiple rows and I am trying to insert them into different fields in the target table. My query is like
    SELECT DESCRIPTION, SUM(AMOUNT)
    INTO v_description, v_amount
    FROM SOURCE_TABLE
    GROUP BY DESCRIPTION;
    This returns values like
    Value A , 100
    Value B, 200
    Value C, 300
    The Target Table has fields for each of the above types e.g.
    VALUE_A, VALUE_B, VALUE_C
    I am inserting the data from a query like
    INSERT INTO TARGET_TABLE (VALUE_A, VALUE_B, VALUE_C)
    VALUES (...)
    How do I split out the values returned by the first query to insert into the Insert Statement? Or do I need to split the data in the statement that inserts into the variables?
    Thanks
    GB

    "Some of the amounts returned are negative so the MAX in the select statement returns 0 instead of the negative value. If I use MIN instead of MAX it returns the correct negative value. However I might not know when the amount is going to be positive or negative. Do you have any suggestions on how I can resolve this?"
    Perhaps something like this could be done in combination with the pivot queries above, although it seems cumbersome.
    SQL> with data as (
      2        select  0 a, 0 b,  0 c from dual   -- So column a has values {0, 1, 4},
      3  union select  1 a, 2 b, -3 c from dual   --    column b has values {0, 2, 5},
      4  union select  4 a, 5 b, -6 c from dual ) --    column c has values {0, -3, -6}.
      5  --
      6  select  ( case when max.a > 0 then max.a else min.a end) abs_max_a
      7  ,       ( case when max.b > 0 then max.b else min.b end) abs_max_b
      8  ,       ( case when max.c > 0 then max.c else min.c end) abs_max_c
      9  from    ( select  ( select max(a) from data ) a
    10            ,       ( select max(b) from data ) b
    11            ,       ( select max(c) from data ) c
    12            from      dual ) max
    13  ,       ( select  ( select min(a) from data ) a
    14            ,       ( select min(b) from data ) b
    15            ,       ( select min(c) from data ) c
    16            from      dual ) min
    17  /
    ABS_MAX_A  ABS_MAX_B  ABS_MAX_C
             4          5         -6
    SQL>

Maybe you are looking for

  • How can I switch my cloud membership to a different country?

    Hello, I started my cloud memebership in June 2012 in the UK (1 year contract) and moved now to Germany. Unfortunately I can't change the country infomation under "My Adobe". Is there any other solution than cancelling my membership (which means I ha

  • Error Starting Coherence 3.6.1 packed in War File From Tomcat 6.0.26

    Hi All, I have been receiving the following error when trying to startup coherence from within a War file: INFO: Deploying configuration descriptor services#test#processor#v1.xml java.net.MalformedURLException: no !/ in spec      at java.net.URL.<ini

  • ITunes doesn't open, QuickTime freezes

    Well, as I read on the subject, a lot of people are experiencing this issue so I don't expect to hear a quick recommendations, still ... Mine is that I upgraded to the last version of iTunes yesterday. Till that moment both Quicktime and iTunes worke

  • Pie Chart Colors

    So I have created a pie chart using the Pie Graph Tool in AI, the data is accurate once it is made, but I cannot change the colors.  After entering in the numbers into the cell I select the check mark.  It makes the pie graph.  Doesn't let me select

  • New MacBook seems slower than it should be

    I have had my new 2Ghz Core 2 with 2GB of ram for about a month or so now and I have to say I have not been that impressed with the speed of the machine. It boots, and shuts down like a blaze and once applications have been opened and closed once the