Write PHP code above HTML tag

I've created a toolset that allows me to add Form fields that
we use in our system. But now I want to take that a step further. I
want to be able to write corresponding PHP code above the HTML tag
at a specific location. This while looping through the formfields
in the form and dynamically write the INSERT and/or UPDATE query.
The last bit I can probably figure out. What I would like to
know is how to write the code above the HTML tag between <?
?> or with a search/replace of the INSERT or UPDATE line in the
code.
Can anyone give me some hints or tips on this?
Thanks in advance!

Hi Bahare,  
The <script> tag is used to define a client-side script, such as a JavaScript.
The <script> element either contains scripting statements or it points to an external script file through the src attribute.Common
uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
You should write C# code inside asp.net (C#)(.cs).page. For more infomation,Please check
http://msdn.microsoft.com/en-us/library/vstudio/k33801s3(v=vs.100).aspx
In addition,
This forum is to discuss problems of C# development.
You'll need to post it in
ASP.NET forum for more efficient responses, where you can contact ASP.NET experts.
Best Regards,
Kristin

Similar Messages

  • Are templates able to update code above html tag?

    Is it possible to use templates to update code preceding the
    doctype declaration and/or the html tag? I am trying to insert php
    code (relating to sessions) and have tried (I believe) all possible
    variants of codeOutsideHTMLIsLocked="false" or "true", combined
    with trying to insert an editable region at the top, etc. I am not
    able to find a solution that works. I may trick DW to insert the
    code site wide, but then it will not update the code nor delete it.
    colin

    Cole.Mountain please try the steps listed in Error "Failed to Install" Creative Cloud Desktop application - http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html to install the updated version of the Creative Cloud Desktop application.

  • How to write C# code in HTML code?

    Hi,
    I want that write C# code in script tag in html document. I write this code:
    <script>
    function AddNewLinkfn()
    var LinkName = prompt("Please enter Link Name:", "");
    var LinAddress = prompt("Please enter Link Address:", "");
    if (LinkName != "" && LinAddress != "" && LinkName != null && LinAddress != null) {
    <% string esmelink=%> LinkName <% ,adreselink= %> LinkAddress<%;%>
    </script>
    but this has error.
    I Thanks anyOne that guide me. :)
    Good luck!

    Hi Bahare,  
    The <script> tag is used to define a client-side script, such as a JavaScript.
    The <script> element either contains scripting statements or it points to an external script file through the src attribute.Common
    uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
    You should write C# code inside asp.net (C#)(.cs).page. For more infomation,Please check
    http://msdn.microsoft.com/en-us/library/vstudio/k33801s3(v=vs.100).aspx
    In addition,
    This forum is to discuss problems of C# development.
    You'll need to post it in
    ASP.NET forum for more efficient responses, where you can contact ASP.NET experts.
    Best Regards,
    Kristin

  • Can i enter php code into html snippets?

    I am an sql/php newbie ... and have my site hosted by a company which offers me sql and php hosting (unlike dotmac I understand) ...
    I have created an sql database on their server and have written a page in html/php to display the results of a simple search ... can I insert this into iweb page using snippet - as I have tried and get a page cannot be displayed message where the snippet box would be on the webpage. (you can see this by clicking on the guestbook link on www.antandcleopuss.com)
    I am wondering if iweb can insert php or if it is only html?
    If iweb doesn't like php inserts then I will have to export my pages to a folder, then open them in a text editor to insert the php there?? (seems like an awfully long way round)
    Any help gratefully received
    ant

    You can add PHP code AFTER publishing the webpage.
    Then change the extension to .php.
    Here's a page the explains how to do it. It's not PHP specific but the routine is the same.
    http://web.mac.com/wyodor/Ajax/
    Of course you can add a PHP page to the HTML Snippet with an iframe.

  • Abap code in HTML Tag in Web Interface

    Hello,
    in a text tag im my web interface for a BPS a added the sap example code "How to Integrate BEx Web Applications into BPS Web Interfaces".
    Now I want to open a web template with a query containing the user and the date as filter object. this filter i want to fill already while creating the url.
    I inserted a command like <%sy-uname%>  but it doesn't get the users name. Do I miss a command to make abap available in this context, or do i have to use javascript. -> can someone give me a tip where i can find the javascript functions ?
    I add the coding below.
    Thanks for your help.
    Dieter
    <iframe id="BWReport03" name="BWQUERY" src="/sap/bw/mime/bex/icons/pixel.gif" width="1000" height="700"></iframe>
    <script language="JavaScript" type="text/javascript">
    function varValueConvert(dispValue){
    /* Expected formatting of variable selector: Text(Key) or Key
       If there are more than one (...) expression the first is taken.
      var keySection = dispValue.match(/(.*?)/);
      if (keySection){
        var keyValue = keySection[0].replace(/(|)/g,"");
        alert(dispValue + ' : ' + keySection + " : " +keyValue);
         return keyValue;
       } else {//alert(dispValue);
        return dispValue;
    var frame = document.getElementById( 'BWReport03' );
    var url = '/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=';
    var filter1 = '&FILTER_IOBJNM_1=ZIPBTCUSR&FILTER_COLLAPS_1=&FILTER_VALUE_EXT_1=';
    var filter2 = '&FILTER_IOBJNM_2=0CALDAY&FILTER_COLLAPS_2=';
    var filter2low  = '&FILTER_VALUE_LOW_EXT_2=';
    var filter2high = '&FILTER_VALUE_HIGH_EXT_2=';
    var appl = 'WZIPBTCLOG_S_LOG001';
    var varvl1 =<b> '<%=sy-uname%>';</b>
    var varvl2 = <b>'<%=sy-datum%>';</b>
    var varvl3 = <b>'<%=sy-datum - 7%>';</b>
    // create URL
    url = url + appl + filter1 + varvl1 + filter2 + filter2low + varvl2 + filter2high + varvl3;
    // remove possible white spaces
    url = url.replace(/ /,"");
    // set source attribute of iframe to new URL
    frame.src = url;
    </script>

    Hi,
    There's a disjoin here when we write the java script it's run at the front end and cannot read any standard SAP variables(unless you code for some kind of rfc call not sure). It can only read what's displayed on the web page. If you can somehow display the user id on the web page you will be able to read it back in the script. Regarding date that's a standard functionality in script
    please refer
    <a href="http://www.w3schools.com/js/js_obj_date.asp">Java script</a>
    hope this was helpful.
    thanks

  • Write EPC code to a tag

    Does anyone tried writing LPN/EPC to a tag?
    I am calling edg_utl.sendtoedge with all the values... But I do not see the device writes to the tag.
    When a device is configured, can it read and write at the same time?
    Can someone help me here!
    Thank you in advance.
    -Prasad

    Hi Prasad,
    I wanted to knowif you were able to accomplish the tag write . I am also attempting similarly,
    Edg_utl.sendtoedge (101, 0, ,’MySite', ‘Alien RFID Reader’, ‘<methods> <method> <params> <param name ="tagid"> 307401D4C00159000000AECA </param> </params> </method> </methods>’, sysdate,’src’,’cor’);
    The event is succssfully executed but tag doesnot get encoded. Below is a clip from the log fileon the same,
    Fri Sep 30 16:59:53 CDT 2005: The device with name: Alien RFID Reader does exist on this machine, attempting to process instruction. Type = 101, Subtype = 0
    Fri Sep 30 16:59:53 CDT 2005: Device with name: Alien RFID Readersuccessfully processed msg
    Fri Sep 30 16:59:54 CDT 2005: Dispatching event with id: 0000 0000 0000 6102 9202 5461
    Fri Sep 30 16:59:54 CDT 2005: Dispatching event with id: 1
    Fri Sep 30 16:59:54 CDT 2005: StreamsDispatcher: Sending msg:Type = 200, Subtype = 0Devicename = Alien RFID Reader
    Fri Sep 30 16:59:54 CDT 2005: StreamsDispatcher: Msg sent:Type = 200, Subtype = 0Devicename = Alien RFID Reader
    Fri Sep 30 16:59:54 CDT 2005: StreamsDispatcher: Sending msg:Type = 1, Subtype = 0[b]Devicename = null
    Fri Sep 30 16:59:54 CDT 2005: StreamsDispatcher: Msg sent:Type = 1, Subtype = 0[b]Devicename = null
    Fri Sep 30 16:59:55 CDT 2005: Dispatching event with id: 0000 0000 0000 6102 9202 5461
    Fri Sep 30 16:59:55 CDT 2005: StreamsDispatcher: Sending msg:Type = 200, Subtype = 0Devicename = Alien RFID Reader
    Fri Sep 30 16:59:55 CDT 2005: StreamsDispatcher: Msg sent:Type = 200, Subtype = 0Devicename = Alien RFID Reader
    Fri Sep 30 16:59:56 CDT 2005: Dispatching event with id: 0000 0000 0000 6102 9202 5461
    Please also note the 'DeviceName = null' , that occurs after the execution of the instruction.
    Would appreciate if anyone in the group could help me resolve this.
    Thanks,
    Vijay

  • Unix apache server: only PHP code can bve malicious?

    I'm working on a site where users can write their own code,
    then the code gets rendered in the page.
    I realize that if they write PHP code, they can do anything.
    So to be safe I should take out
    anything between <? and ?> from the code they post.
    what else? what kind of code can really do damage, on a Unix
    server running Apache?
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

    > Is this going to be a major security risk, no matter how
    I screen the
    > code?
    I would think so, yes, but I'm quite far from a security
    whiz....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "(_seb_)" <[email protected]> wrote in message
    news:ejv316$hcr$[email protected]..
    > Murray *ACE* wrote:
    >> What would be an example of the kind of code they
    *could* write, seb?
    >>
    >
    > example:
    >
    > <object width="425" height="350"><param
    name="movie"
    > value="
    http://www.youtube.com/v/kUsUGaTBChw"></param><param
    name="wmode"
    > value="transparent"></param><embed
    > src="
    http://www.youtube.com/v/kUsUGaTBChw"
    > type="application/x-shockwave-flash" wmode="transparent"
    width="425"
    > height="350"></embed></object>
    >
    > (this is the embed-code for displaying a youtube video
    on any page)
    >
    > other example:
    >
    > <font>Cool, so i can customize this?</font>
    > <h1>WOW</h1>
    > <table height="200%">
    > i'm a bit retarded but that sounds like fun
    > </tr>
    > <table>
    >
    >
    > The code will be rendered in an iframe, so I don't care
    if they write
    > broken html - that's their business. But I should not
    allow javascript,
    > and I'd like to make sure they can't full-around with
    the server (Linux,
    > Apache PHP).
    >
    > Is this going to be a major security risk, no matter how
    I screen the
    > code?
    >
    >
    > --
    > seb ( [email protected])
    >
    http://webtrans1.com | high-end web
    design
    > Downloads: Slide Show, Directory Browser, Mailing List

  • PHP Shoutbox : stop users posting php code

    hi guys/girls
    can anyone give me an easy way to stop users on my site
    posting php code into a shoutbox.
    i have a shoutbox made up of a normal html form that posts
    their shouts to a mysql database using php.
    at the moment the only validation i have in place is the
    built in form validation dreamweaver8 has which stops
    users posting a blank post. however a user can post php code
    if they know how, which could cause problems.
    thanks
    ted.

    tedrodgers wrote:
    > i dont see how the highlight file function helps me in
    this case? please explain alittle more.
    That suggestion came from "Pro PHP Security". However,
    looking at the
    PHP manual, it should be highlight_string(), not
    highlight_file().
    http://www.php.net/manual/en/function.highlight-string.php
    How would it help? highlight_string() converts PHP code to
    HTML for
    display purposes. Once converted to HTML, it cannot be
    executed or do
    any harm to your website.
    > and what other validation do you suggest?
    Without knowing the details of your application, it's hard to
    say; but
    just checking that the text area isn't blank is no protection
    at all.
    Attackers could post spam or hot link to pornographic images.
    Two simple
    measures would be to pass the content to strip_tags() and/or
    htmlentities().
    http://www.php.net/manual/en/function.strip-tags.php
    http://www.php.net/manual/en/function.htmlentities.php
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Html tags in forms 9i

    <input
    type=file>
    Is it possible for me to use the above html tag in oracle forms in any way?
    I want to use this tag to talk to my desktop from Forms9i, read a file and load data into a database table.
    We dont have webutil configured yet.

    Hi,
    Forms is a Java Applet on the client that doesn't knwo about html tags. If you need to upload file, then WebUtil is what you need to configure.
    Frank

  • Muse CC Emails sent by Form widget are shown as html-tags

    Hi,
    I´ve got the following problem that emails sent by the Muse CC form widget are shown as html-code or html-tags in my inbox.
    Though the message contains all filled in data this is a quite unreadable format similarily as in post http://forums.adobe.com/message/5818028#5818028
    I already read the discussions here in the community but as it seems the issue though already known seems not be fixed yet nor does any of the answers which refer to the ISP configurations regarding message handling apply to me. Actually this is a first time issue with mails - haven´t had this problem up to now so I guess it´s a Muse thing.
    Though the mail is shown in some kind of html-tag format as mentioned it is actually marked as "text only" message?
    Furthermore the message is UTF-8 so there shouldn´t be any problems with special characters either but also German consonants like "ä,ü,ö" are not formatted correctly.
    I am using Windows 7, Outlook 2013 by the way.
    The Muse site was exported as html and then uploaded via ftp, I am not using catalyst.
    No idea what´s going wrong here hopefully someone has a solution to this problem.
    Help would be very much appreciated. Thanks in advance.
    (Hope my English is understandable)

    I have the same situation (( what to do?

  • Smartform with text containing html tags

    I am reading from a table that contains html tags like
    <br>
    <menu>
    <LI type="disc">This is a line which contains html tags
    that goes over to 2nd line
    <LI type="disc"> This is also another line which contains html
    tags.
    and each line is stored in a different row. The customer has agreed to use only 3 of the above html tags (
    <br>, <menu> and <LI type="disc">
    When the output is previewed in smartforms, the html tags needs to be formatted and not print in raw format as follows: 
    <LI type="disc">This is a line which contains html tags
       that goes over to 2nd line
    <LI type="disc"> This is also another line which contains html
       tags.
    How can this be done ?

    ok understood...
    you can try this
    Loop at i_html into wa_html.
    tmp = strlen( wa_html-line).
    do tmp times.
    if wa_html-line+0(1) = <
    l_start = 1.
    __elseif wa_html-line+0(1) = >
    l_start = 0.
    concatenate l_char wa_html-line+0(1) into l_char.
    endif.
    if l_start = 1.
    concatenate l_char wa_html-line+0(1) into l_char.
    wa_html-line = wa_html-line+1(l_tmp - sy-index) OR use the keyword SHIFT LEFT...plz chk the syntax
    elseif l_start = 0 and l_char = <LItype=disc>
    concatenate <BULLET>  wa_html-line into  wa_html-line separated by space.
    endif.
    enddo.
    modify i_html form wa_html.
    endloop.
    now u define two text element one with bullet and another without bullet. this is how u insert bullet:
    goto to the texteditor of a text element in smartform. Its a small button on the left hand side of.
    Then goto insert>characters>sap symbols.
    for ur requirement u can use the symbol SYM_FILLED_CIRCLE.
    Remember these icons or symbols whatever u will not be able to see in print preview....u have to take a print
    and see
    Now at the time of display check if the line contains the
    tag <BULLET> ( if wa_html-line+0(8) = '<BULLET>')
    if the line has the tag then display ur text in the text element with bullet
    otherwise
    display it in the non bullet text element..
    remeber to remove the tag before dispalying
    hope this solves ur prob...

  • How to write good PHP code in dreamweaver?

    Here's the thing.  I'm using Dreamweaver CS4 to develop a website.  In the past my php files would look like this:
    <?php
        echo '<h1>Welcome ' . $name . '</h1>';
    ?>
    This caused problems in the design view because all I would see would be the php icon to let me know I have some script in this location and that is it.
    Then I started to realize that I should write my code like this:
    <h1>Welcome <?php echo $name; ?></h1>
    This second way of writing php code is a lot easier to work with in Dreamweaver since in the design view I can see the formatted h1 tag with the word 'Welcome' beside it (followed by the php icon).  I can still apply all the standard CSS rules inside Dreamweaver and the design view updates nicely.
    So now here is my issue.What is the best way to handle if statements?  Say I want to toggle between <h1>Welcome $user</h1> and <h2>Good bye</h2> BUT I would like to still be able to format the CSS and see the results on the screen in design view.  Is it possible?
    If I do the following, then I'm back to square one.  I can't see my CSS rules applied in the design view since all I have is the PHP icon to show where the script is located:
    <?php
       if( $welcome ) {
          echo '<h1>Welcome ' . $name . '</h1>';
       else {
          echo '<h2>Good bye</h2>';
    ?>

    There is another way. But it's considered advanced PHP in this community. It's called a a ternary operator. So
    <?php
       if( $welcome ) {
          echo '<h1>Welcome ' . $name . '</h1>';
       else {
          echo '<h2>Good bye</h2>';
    ?>
         woud look like:
         <?php echo($welcome?'<h1>Welcome '. $name . '</h1>' : '<h2>Good bye</h2>'); ?>
    Here's a link to a good explanation: http://www.addedbytes.com/code/ternary-conditionals/

  • I am not getting required output after importing xml file having HTML tags, MathML and Latex code

    I created well formatted xml having html tags, MathML code and Latex code inside
    XML with sample latex
    <question>
        <p> 8. In this problem, <Image  style="vertical-align: -9pt" title="5a\frac{7b}{3}" alt="5a\frac{7b}{3}" href="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%205a%5Cfrac%7B7b%7D%7B3%7D%0A"></Image> and <Image href="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%207b%5Cfrac%7B5a%7D%7B3%7D" style="vertical-align: -9pt" title="7b\frac{5a}{3}" alt="7b\frac{5a}{3}"> </Image>are both mixed numbers, like <Image src="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%203%20%5Cfrac%7B1%7D%7B2%7D%20=%203.5" style="vertical-align: -9pt" title="3 \frac{1}{2} = 3.5" alt="3 \frac{1}{2} = 3.5"></Image>. The expression <Image style="vertical-align: -9pt" title="5a \frac{7b}{3} \ \times 7b \frac{5a}{3}" alt="5a \frac{7b}{3} \ \times 7b \frac{5a}{3}" href="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%205a%20%5Cfrac%7B7b%7D%7B3%7D%20%5C%20%5Ctimes %207b%20%5Cfrac%7B5a%7D%7B3%7D"> </Image>is equal to which of the following choices? </p>
    </question>
    XML with sample html tags
    <p>4. Examine the expression 3<i>k</i><sup>2</sup> + 6<i>k</i> - 5 + 6<i>k</i><sup>2</sup> + 2.</p><p>When it is simplified, which of the following is the equivalent expression?</p>
    XML with sample MathML tags
    <p>5. Find the vertex of the parabola associated with the quadratic function <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mo> </mo><mo>=</mo><mo> </mo><mo>-</mo><msup><mi>x</mi><mn>2</mn></msup><mo> </mo><mo>+</mo><mo> </mo><mn>10</mn><mi>x</mi><mo> </mo><mo>+</mo><mo> </mo><mn>4</mn></math></p>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mo>-</mo><mn>5</mn><mo>,</mo><mo> </mo><mn>69</mn></mrow></mfenced></math><br>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mn>5</mn><mo>,</mo><mo> </mo><mn>29</mn></mrow></mfenced></math><br>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mn>5</mn><mo>,</mo><mo> </mo><mn>69</mn></mrow></mfenced></math><br>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mo>-</mo><mn>5</mn><mo>,</mo><mo> </mo><mn>29</mn></mrow></mfenced></math>
    None of the above works fine after importing xml to Indesign document/templete, it is not renderting equivalent out instead it is showing the same text inside tags in the Indesign document.
    I have lot of content in our database, I will export to XML, import to Indesign, Indesign should render required output like what we see in the browser and export the output to printed format.
    Import formated XML to indesign --> Export to Quality Print Format
    Can any one guide me and let me know whether it is posible to do with Indesign, if so let me know in case if I am missing anything in importing xml and get required output.
    Thanks in advance. Waiting for reply ASAP.

    Possibly your expectations are too high. ... Scratch that "possibly".
    XML, in general, cannot be "rendered". It's just an abstract data format. Compare it to common markup such as *asterisks* to indicate emphasized words -- e-mail clients will show this text in bold, but InDesign, and the vast majority of other software, does not.
    To "render" XML, HTML, MathML, or LaTeX -- you seem to freely mix these *very* different markup formats, unaware of the fact that they are vastly different from each other! -- in the format you "expect", you need to apply the appropriate software to each of  the original data files. None of these markup languages are supported natively by InDesign.

  • Use PHP code coloring in HTML files

    In Dreamweaver CS3, what changes do I need to make to get PHP
    code coloring show up in .html files?

    robot88888888,
    First, copy this file from the app config folder:
    C:\Program Files\Adobe\Adobe Dreamweaver
    CS3\configuration\CodeColoring\PHP.xml
    To the user config folder:
    C:\Documents and Settings\[username]\Application
    Data\Adobe\Dreamweaver
    9\Configuration\CodeColoring\
    Then open PHP.xml in your favorite editor. You need to add
    HTML to all
    of the doctype lists Change every occurrence of this:
    doctypes="PHP_MySQL"
    to be:
    doctypes="PHP_MySQL,HTML"
    Save and close. If DW is running, close it. Now restart DW.
    HTH,
    Randy
    > In Dreamweaver CS3, what changes do I need to make to
    get PHP code coloring show up in .html files?

  • How to write this sql query in php code ?

    for example:
    insert into temp
    select *
    from testtable;
    after this, i will query data from sql below:
    select *
    from temp;
    how to write this php code ?
    who can help me ?
    thanks!

    Have a look at the manual to find out how to issue queries.
    http://us3.php.net/oci8

Maybe you are looking for

  • How to Find the Latest Version of Cluster Binary Files available at Microsoft website

    How we can find the latest version of Cluster binary files available for download at Microsoft Website and which Cluster Binaries should be update to make the Cluster services stable healthy.

  • Smartforms/Smartstyle How to create/upload paragraph and character formats

    Hi Folks, I am working on a demo IDES system. In my ECC 6.0 system, the paragraph formats were not included. How can import or include or create or upload paragraph and character formats in order to create smartforms and smartstyles. Waiting for your

  • Are you looking for work in the UK?

    I have various Labview contract and permanent positions available across the UK. If you would like to know how much you are worth, please email your CV to [email protected] I look forward to hearing from you. Tom Puffett. Sent via Deja.com http://www

  • TM wireless routing from iMac via Ethernet cable

    I'm in Spain and have a wireless router from my ISP.  I have my iMac connected over wifi to the router.  I now have a 4th gen Time Machine that I am connecting directly to my iMac via an ethernet cable. What I'm trying to do is to use the Time Machin

  • Could not find the orgunit text in HRP 5125 in Erecrutment

    Hi All, When we look at the create requisition page (general info tab page ) we could see the org unit as well as its description.But when we look at table HRP5125 we could only see theORGID (id of organization field) but we could not see the text of