Pagination of output  php code with sql code

if one program of php including sql query
it seems to output wrong .(means some data will be calculated sum)
if php code output all data in one page.pagination
it seems to output right(means some data will be calculated sum)
if there has column of company including two companies of A and B.
and if each page output 3 lines while A company has 4 lines in sql query,so
the last line of A company will output in second page,
i want to calculate A company including 4 lines sum
how to calculate sum of company of A in second page.
i think it will be a good interesting question of php code with sql code.
who can solution thus question ?
thanks !

Hi,
for Example:
SELECT sum(quantity * price)
FROM orders
WHERE COMPANY = 'A';
This will give you the total amount for company A.
But remember that your example table will give no output, since you have no price column. So you must decide, what which sum to calculate.
A sum only calculated over the quantity makes IMHO no sense, because there are apples and bananas ...
Greetings from Hamburg
Thorsten Körner

Similar Messages

  • A difficult problem with php code and sql code

    it's good place to visit(Paged Result Sets with PHP and Oracle)
    http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_paged.html
    maybe below part php code could not be used in above address's php code.
    if((isset($l_company) and $l_company != $rows['COMPANY']) or empty($stmt) and empty($total_pages) ) {
    echo "<tr bgcolor='#CCFFCC'>";
    echo "<td colspan= 3 align='center'>".$l_company."</td>";
    echo "<td >".$totalcomany." </td>";
    $totalcomany = 0;
    echo "<td > </td>";
    echo "</tr>";
    $l_company = $rows['COMPANY'];
    because the same company in one page could calculate sum while if
    the same company in two pages could not do that.
    and what do you think of ?
    thanks !

    Hi,
    this is because your sql-statement selects only the rows, you need to build this one page.
    Neither php nor the given result from your query knows about data wich will be part of the result of another page.
    Greetings from Hamburg
    Thorsten Körner

  • Sql code with php code

    for example:
    create table testtable (
    sales_area varchar2(30),
    sales_comp varchar2(40),
    sales_market varchar2(30),
    order_number number(20),
    order_date varchar2(20),
    item_id number(15),
    quantity number(20),
    item_desc varchar2(50)
    insert into testtable values ('westarea','acompany','amarket','52001',1001,1,10,'apple');
    insert into testtable values ('westarea','acompany','amarket','52005',1002,2,20,'banana');
    insert into testtable values ('eastarea','bcompany','bmarket','52002',1003,2,50,'banana');
    insert into testtable values ('eastarea','bcompany','bmarket','52004',1006,1,30,'apple');
    insert into testtable values ('eastarea','bcompany','bmarket','52003',1007,1,30,'apple');
    insert into testtable values ('westarea','ccompany','cmarket','52006',1003,1,30,'orange');
    insert into testtable values ('westarea','ccompany','dmarket','52007',1004,3,60,'orange');
    commit;
    select *
    from testtable
    it outputs below:
    westarea     acompany     amarket     52001     1001     1     10 apple
    westarea     acompany     amarket     52005     1002     2     20 banana
    eastarea     bcompany     bmarket     52002     1003     2     50 banana
    eastarea     bcompany     bmarket     52004     1006     1     30 apple
    eastarea     bcompany     bmarket     52003     1007     1     30 apple
    westarea     ccompany     cmarket     52006     1003     1     30 orange
    westarea     ccompany     dmarket     52007     1004     3     60 orange
    use php code outputs like below php code :
    apple banana orange .......
    westarea     acompany     amarket     52001     1001     10
    westarea     acompany     amarket     52005     1002     20 ........
    acompany 10 20 .........
    westarea     ccompany     cmarket     52006     1003          30 .........
    westarea     ccompany     dmarket     52007     1004          60 .........
    ccompany 90 .........
    westarea 10 20 90 .........
    eastarea     bcompany     bmarket     52002     1003     50 .........
    eastarea     bcompany     bmarket     52004     1006     30 .........
    eastarea     bcompany     bmarket     52003     1007     30 .........
    bcompany 60 50 .........
    eastarea
    total 70 70 90 ......
    make below php code output a new table:
    <?php
    $v_item_count = count(array(item));
    echo"<table border = 1>";
    echo "<tr>";
    echo "<td rowspan="2">sales area</td>";
    echo "<td rowspan="2">sales comp</td>";
    echo "<td rowspan="2">sales market</td>";
    echo "<td rowspan="2">customer_number</td>";
    echo "<td rowspan="2">order_number</td>";
    echo "<td colspan="'||to_char($v_item_count)||'">categories and quantities</td>";
    while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
    echo "<tr>";
    echo "<td>".$row['ORDER_NUMBER']."</td>";
    ?>
    who can help me?

    for example:
    while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
    echo "<tr>";
    echo "<td>".$row['ORDER_NUMBER']."</td>";
    echo "<td>".$row['ORDERED_DATE']."</td>";
    for ($i=0; $i<sizeof($items); $i++) {
    echo "<td>".$row[$i]." </td>";
    echo "</tr>";
    echo "</table>";
    ?>
    above php code should output plentites of lines while it output few lines.
    i don't know there has many lines outputed?
    who can help me?

  • Having trouble with my PHP code. Appers to get stuck on a white page.

    HI all,
    I have just began having trouble with my PHP code. Was working before and haven't made any changes to the code since last time it worked.
    What happens is after the form is submitted it goes to a white page (no text just all white page) and in the address bar it has the path for my php page. what supposed to happen is either it goes to a success page or a error page.
    I've had a problem where the info entered is correct but was directed to the error page. i managed to fix that issue but i am puzzled what is happening to my php page now.
    Mind you that i didn't write this code i just took over the responsiblities of this website and i am hopping that its a quick fix.
    I appreciate any help you could give me. Thank you.
    CODE:
    <?php
       $to = '[email protected]';
          $from = '[email protected]';
            //Make sure we have some info posted from the form...
            if (isset($HTTP_POST_VARS)){
                //Clear the body of the message to be sent
                $body = '';
                //go through all POSTed variables sent
                while (list($key, $value) = each($HTTP_POST_VARS)){
        if($key <> "Submit" && $key <> "submit") {
         $body .= $key . ' = ' . $value . "\r\n"; 
                //Now building mail headers.....
                $headers = "From: ".$from."\r\n";
                //Mail message
                $success = mail($to, "Email Club" . date("m/d/Y"), $body, $headers);
       // CURL stuff.....
       $ch = curl_init();
       curl_setopt($ch, CURLOPT_FAILONERROR, 1);
       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
       curl_setopt($ch, CURLOPT_TIMEOUT, 4); //times out after 4s
       curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
                 if ($success){
        //readfile('http://www.lvpaiutegolf.com/thankyou.html');
        curl_setopt($ch, CURLOPT_URL,"http://www.lvpaiutegolf.com/thankyou.html");
        header("Location:http://www.lvpaiutegolf.com/thankyou.html");
                else{
                 // readfile('http://www.lvpaiutegolf.com/error.html');
         curl_setopt($ch, CURLOPT_URL,"http://www.lvpaiutegolf.com/error.html");
         header("Location:http://www.lvpaiutegolf.com/error.html");
       // Output
       //$result=curl_exec ($ch);
       //curl_close ($ch);
       //echo $result'";
    ?>

    Insert the install disk and boot from it. Use disk utitlity to repair your drive and check for errors (report any errors back here) then reinstall the os. This should not erase your data.

  • Php code about sql query

    for example:
    create table testtable (
    order_number number(4),
    item_id number(4),
    quantity number(8),
    item_desc varchar2(16)
    insert into testtable values (1001,1,10,'apple');
    insert into testtable values (1001,2,20,'banana');
    insert into testtable values (1002,2,50,'banana');
    insert into testtable values (1002,1,30,'apple');
    insert into testtable values (1003,3,60,'orange');
    insert into testtable values (1004,3,50,'orange');
    commit;
    Table Test DATA
    order_number item_id quantity item_desc
    1001 1 10 apple
    1001 2 20 banana
    1002 2 50 banana
    1002 1 30 apple
    1003 3 60 orange
    1004 3 50 orange
    i want to make above sql query output in 3 pages.
    order_number item_id quantity item_desc
    1001 1 10 apple
    1001 2 20 banana
    when i click next_page it output below:
    order_number item_id quantity item_desc
    1002 2 50 banana
    1002 1 30 apple
    and when i click next_page again it will output below:
    order_number item_id quantity item_desc
    1003 3 60 orange
    1004 3 50 orange
    using url:http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_paged.html
    please look at three php code below:
    php code:
    <?php
    $con = oci_connect('apps','apps','prod');
    $sql = "select distinct h.order_number,h.order_type_id,h.price_list_id
    from oe_order_headers_all h
    where to_char(h.ordered_date,'YYYYMMDD') = '20060627'
    and h.org_id = 82
    order by order_number ASC";
    $result = oci_parse($con,$sql);
    oci_execute($result);
    echo "<table border = 1>";
    echo "<tr><td>order_number</td>";
    echo "<td>order_type</td>";
    echo "<td>price_id</td></tr>";
    while ($rows = oci_fetch_array($result,BOTH_NUM)) {
    echo "<tr><td>". $rows[0]."</td>";
    echo "<td>".$rows[1]."</td>";
    echo "<td>".$rows[2]."</td></tr>";
    ?>
    pager_functions.php
    <?php
    function total_pages($total_rows, $rows_per_page) {
    if ( $total_rows < 1 ) $total_rows = 1;
    return ceil($total_rows/$rows_per_page);
    function page_to_row($current_page, $rows_per_page) {
    $start_row = ($current_page-1) * $rows_per_page + 1;
    return $start_row;
    function count_rows(& $conn, $select) {
    $sql = "SELECT COUNT(*) AS num_rows FROM($select)";
    $stmt = oci_parse($conn,$sql);
    oci_define_by_name($stmt,"NUM_ROWS",$num_rows);
    oci_execute($stmt);
    oci_fetch($stmt);
    return $num_rows;
    function & paged_result(& $conn, $select, $start_row, $rows_per_page) {
    $sql = "SELECT
    FROM
    SELECT
    r.*, ROWNUM as row_number
    FROM
    ( $select ) r
    WHERE
    ROWNUM <= :end_row
    WHERE :start_row <= row_number";
    $stmt = oci_parse($conn,$sql);
    oci_bind_by_name($stmt, ':start_row', $start_row);
    // Calculate the number of the last row in the page
    $end_row = $start_row + $rows_per_page - 1;
    oci_bind_by_name($stmt, ':end_row', $end_row);
    oci_execute($stmt);
    // Prefetch the number of rows per page
    oci_set_prefetch($stmt, $rows_per_page);
    return $stmt;
    ?>
    outpages.php:
    <?php
    $conn = OCILogon('scott', 'tiger') or die ("Unable to connect to db");
    require_once 'pager_functions.php';
    $rows_per_page = 3;
    $url = 'results.php'; // URL to this script
    $sql = 'SELECT * FROM testtable ORDER BY rank ASC'; // The unfiltered
    // Get the total page count from the number of rows
    $total_rows = count_rows($conn,$sql);
    $total_pages = total_pages($total_rows, $rows_per_page);
    // Make sure the page number is a sane value
    if ( !isset($_GET['page']) ||
    !preg_match('/^[0-9]+$/',$_GET['page']) ||
    $_GET['page'] < 1 ) {
    $_GET['page'] = 1;
    } else if ( $_GET['page'] > $total_pages ) {
    $_GET['page'] = $total_pages;
    // Translate the page number into a starting row number
    $start_row = page_to_row($_GET['page'], $rows_per_page);
    // Filter to a single page of rows
    $stmt = & paged_result($conn, $sql, $start_row, $rows_per_page);
    ?>
    <table width="600">
    <caption>Feedster Top 500 Blogs [#<?php echo $_GET['page']; ?>]</caption>
    <thead>
    <tr>
    <th>Rank</th>
    <th>Blog</th>
    <th>Inbound Links</th>
    </tr>
    </thead>
    <tbody>
    <?php while (OCIFetchinto($stmt,$row,OCI_ASSOC)) { ?>
    <tr valign="top">
    <td align="right"><?php echo htmlspecialchars($row['RANK']); ?></td>
    <td>
    ">
    <?php echo htmlspecialchars($row['NAME']); ?>
    </a>
    </td>
    <td align="right"><?php echo htmlspecialchars($row['LINKS']); ?></td>
    </tr>
    <?php } ?>
    </tbody>
    <tfoot>
    <tr>
    <td colspan="3" align="center">
    <?php echo draw_pager($url, $total_pages, $_GET['page']); ?>
    </td>
    </tr>
    </tfoot>
    </table>
    ?>
    above two php codes in the same folder
    when i run outpages.php it runs below result:
    Feedster Top 500 Blogs [#1]
    Rank Blog InboundLinks
    may be above php code doesn't output what i mean .
    who can help me ?

    Hi,
    Your table testtable is defined as follows:
    create table testtable (
    order_number number(4),
    item_id number(4),
    quantity number(8),
    item_desc varchar2(16)
    In your script, you are refering to the columns 'RANK', 'NAME', 'URL' and 'LINKS'!!!
    They simly doesn't exist.
    You simply copied and pasted a snippet from the oracle-php-cookbook without adapting it to your needs. (And I assume without understanding, what that code will do.)
    Greetings from Hamburg
    Thorsten Körner

  • 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

  • Mix jython code with sql

    Hi,
    I have just read the following sentence in the odi jyhon reference:
    "Oracle Data Integrator users may write procedures or knowledge modules using Jython, and may mix Jython code with SQL, PL/SQL, OS Calls, etc."
    Does anyone of you know how jython can be mixed with SQL in a knowledge module? I just know how to embed java code with the <% %> tag. But how about jython (e.g. when used in a knowledge module task with technology = "Oracle"?
    I appreciate your help.
    best regards,
    Hans

    So Firstly I have never done this in KM but it works well in Procedure so I think it would work in a KM but I'm not sure.
    So I will show you an exemple which will be easyer than lot of explanation.
    This exemple is a step of a procedure which is supposed to send an email if there is an error in an execution.
    This Step retrieve informations about the execution as the error message or the execution context...
    In the Target Command :
    Technology= Jython
    I have :
    EmailBody = EmailBody + r'''<TR><TD><CENTER>#NO</CENTER></TD><TD>#SESS_NAME</TD><TD>#STEP_NAME
    </TD><TD>#CONTEXT</TD><TD>#DEBUT</TD><TD>#MSG</TD></TR>'''
    Contexte = '#CONTEXT'.
    --> the #variable are the informations that I will extract in the source.
    In the Source Command :
    Technology = Oracle .
    SELECT L.SESS_NO || ' / ' || L.NNO "NO", STEP_NAME, SESS_NAME, SS.CONTEXT_CODE "CONTEXT", L.STEP_BEG "DEBUT", X.TXT "MSG", L.step_rc "RC"
    FROM <%=snpRef.getObjectName("L", "SNP_STEP_LOG", "D")%> L,
    <%=snpRef.getObjectName("L", "SNP_SESS_STEP", "D")%> SS,
    <%=snpRef.getObjectName("L", "SNP_SESSION", "D")%> S,
    <%=snpRef.getObjectName("L", "SNP_EXP_TXT", "D")%> X
    WHERE L.SESS_NO = <%=snpRef.getSession("SESS_NO")%> AND
    L.SESS_NO = SS.SESS_NO AND L.NNO = SS.NNO AND S.SESS_NO = L.SESS_NO AND
    STEP_STATUS = 'E' and L.I_TXT_STEP_MESS=X.I_TXT and X.TXT_ORD=0
    And with this the Jython keep the information of the Query...
    So I would like to apologize cause in my last post I have inversed the Target and the Source... Sorry. Hope that your problem didn't come from here...
    Evidently you will have SQL as Source and Jython as Target...

  • Am I able to add custom PHP code to a site created with Adobe Muse?

    I am looking into creating a new desktop and mobile website for a client and their current site is hosted on their own server and has custom PHP code. Would I be able to re-embed the code into the new site, or would you recommend  just creating a new form in Muse and then transfer the site to their server?

    Hi,
    take a look o this thread, Can I use a php script in muse?
    if you still have any question, please let us know

  • Reporting Service Error Code 7403, on SCCM 2012 R2 with SQL 2012 SP1 CU6

    Dear All,
    I am facing issue to install Reporting Services Point on SCCM 2012 R2 with SQL 2012 SP1 CU6. getting error messages id 7403. please let me know if SQL 2012 SP1 CU6 is supported with SCCM 2012 R2 or not & if you have any solution on it.
    Error Message: The report server service is not running on Reporting Service Point server "SCCM2012"; start the service to enable reporting.

    I am getting below error msg when trying to browse both sites
    1) For Reports
    The report server cannot decrypt the
    symmetric key that is used to access sensitive or encrypted data in a report
    server database. You must either restore a backup key or delete all encrypted
    content. (rsReportServerDisabled)
    Get Online Help
    Keyset does not exist (Exception from
    HRESULT:
    0x80090016)
    2) For Reportserver
    Reporting Services Error
    The report server cannot decrypt the symmetric key that is used to access
    sensitive or encrypted data in a report server database. You must either restore
    a backup key or delete all encrypted content. (rsReportServerDisabled)
    Get Online Help
    Keyset does not exist (Exception from HRESULT: 0x80090016)
    SQL Server Reporting Services

  • The reason about php code

    for example:
    create table testtable (
    order_number number(40),
    item_id number(40),
    quantity number(20),
    item_desc varchar2(50)
    insert into testtable values (1001,1,10,'apple');
    insert into testtable values (1001,2,20,'banana');
    insert into testtable values (1002,2,50,'banana');
    insert into testtable values (1002,1,30,'apple');
    commit;
    Table Test DATA
    order_number item_id quantity item_desc
    1001 1 10 apple
    1001 2 20 banana
    1002 2 50 banana
    1002 1 30 apple
    if I insert into testtable below new line :
    insert into testtable values (3020002506,242,5,'580gcreamery1x10');
    why below example doesn't work?
    <?php
    $table ="testtable";
    //$sid="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=202.79.36.170)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=WLDB)))";
    $conn = ocilogon("apps", "apps", "prod");
    $sql="select distinct(item_desc) item_desc from $table";
    $stmt = oci_parse ($conn, $sql);
    oci_execute ($stmt);
    $items=array();
    $result= array();
    $i=0;
    while ($result = oci_fetch_array($stmt,OCI_BOTH)) {
    $items[$i]=$result['ITEM_DESC'];
    // echo $result['ITEM_DESC'];
    $i=$i+1;
    //build part of select stateme
    for ($i=0; $i<sizeof($items); $i++) {
    $select_items .= "SUM($items[$i]) $items[$i],";
    for ($i=0; $i<sizeof($items); $i++) {
    $decode_items .= "DECODE(item_desc,'$items[$i]', quantity, null) $items[$i],";
    //final SQL statement
    $sql="SELECT $select_items order_number
    FROM (SELECT $decode_items order_number FROM $table )
    group by order_number";
    $stmt=oci_parse ($conn, $sql);
    oci_execute($stmt);
    echo "<table border=1>";
    echo "<tr>";
    echo "<td>Order Number</td>";
    for ($i=0; $i<sizeof($items); $i++) {
    echo "<td>".$items[$i]." </td>";
    echo "</tr>";
    while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
    echo "<tr>";
    echo "<td>".$row['ORDER_NUMBER']."</td>";
    for ($i=0; $i<sizeof($items); $i++) {
    echo "<td>".$row[$i]." </td>";
    echo "</tr>";
    echo "</table>";
    ?>
    who can help me?
    thanks!

    Try this...
    I modified code a little, because your PHP-style is not too exellent :( (newbie?), but this code is equivalent to your original posted... The difference is in output part. Look at this part more attentive!
    <?php
    $table ="testtable";
    $sql="select distinct(item_desc) item_desc from $table";
    if ($conn = ocilogon("apps", "apps", "prod")) oci_execute (oci_parse ($conn, $sql));
    else die ("Connection error!");
    $items=array(); $result= array(); $i=0;
    while ($result = oci_fetch_array($stmt,OCI_BOTH)) $items[]=$result['ITEM_DESC'];
    //build part of select stateme
    $select_items = ''; $decode_items = '';
    foreach ($items AS $item) {
    $select_items .= "SUM($item) $item,";
    $decode_items .= "DECODE(item_desc,'$item', quantity, null) $item,";
    //final SQL statement
    $sql="
    SELECT $select_items order_number
    FROM (SELECT $decode_items order_number FROM $table )
    GROUP BY order_number
    if ($conn) oci_execute(oci_parse ($conn, $sql));
    else die ("Connection error!");
    echo "<table border=1>";
    echo "<tr>";
    echo "<td>Order Number</td>";
    foreach ($items AS $item) echo "<td>$item</td>";
    echo "</tr>";
    while ($row = oci_fetch_array ($stmt, OCI_BOTH)){
    echo "<tr>";
    echo "<td>".$row['ORDER_NUMBER']."</td>";
    for ($i=0; $i<sizeof($items); $i++) {
    // echo "<td>".$row[$i]." </td>";
    // Maybe you mean $row[$item] ???
    echo "<td>".$row[$item]." </td>";
    echo "</tr>";
    echo "</table>";
    ?>
    Message was edited by:
    Jet

  • 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.

  • Problem in php code

    i am returning a cursour from a procedure in oracle.when use the OCIFetchStatement i cannot get the rows from the table perhaps get the error as undefined before fetch or execute could u plz help me in this !!!
    <?php
    $conn = OCILogon("crisdev", "sept26", "shopfut.bss.telenor.com.pk")or die("Could not connect : " . mysql_error());
    //$bind2="T";
    $SQL = "BEGIN PKG_TEST2.prc_Get_Inventory_Category(:bind1); END; ";
    //CRISDEV.PKG_GROUP_MGMT.prc_Get_Group_status
    $stmt = ociparse($conn,$SQL);
    //echo $cur;
    $res = OCINewCursor($conn);
    //echo $res;
    ocibindbyname($stmt,"bind1",&$res,-1,OCI_B_CURSOR);
    ociexecute($stmt);
    //DisplayResults($stmt); // echo "<br>";
    ociexecute($res);
    $nrows = OCIFetchStatement($stmt,$results);
    if ( $nrows > 0 ) {
    print "<TABLE BORDER=\"1\">\n";
    print "<TR>\n";
    while ( list( $key, $val ) = each( $results ) ) {
    print "<TH>$key</TH>\n";
    print "</TR>\n";
    for ( $i = 0; $i < $nrows; $i++ ) {
    reset($results);
    print "<TR>\n";
    while ( $column = each($results) ) {
    $data = $column['value'];
    print "<TD>$data[$i]</TD>\n";
    print "</TR>\n";
    print "</TABLE>\n";
    } else {
    echo "No data found<BR>\n";
    print "$nrows Records Selected<BR>\n";
    OCIFreeCursor($stmt);
    OCIFreeStatement($res);
    OCILogoff($conn);
    ?>

    I don't see an event title referenced in your code?
    You posted a link to day.php, which will include url
    variables. The link
    will be attached to a variable currentDay, which is not being
    printed, at
    least not correctly.
    There is no form attached, so nothing can be posted. THere is
    no
    event_title variable, so I cannot comment on what might
    happen with it.
    Can you try to either rephrase your question, or post more
    relevant code?
    If you're tryign to get the Current Day to print out in the
    code you
    provided, then you would need an echo statement.
    <?php
    echo '<a
    href="day.php?m=$month&y=$year&d=$CurrentDay">'.$currentDay.'</a>';
    ?>
    HTH,
    Jon
    "AdonaiEchad" <[email protected]> wrote in
    message
    news:enuugb$pq6$[email protected]..
    > Ok, how do I get my MySQL event_title to show up when a
    event_date has
    > been
    > posted.
    >
    > In the PHP code of line
    >
    > <a
    href='day.php?m=$month&y=$year&d=$currentDay'>$currentDay</a>
    >
    > See the code above for more details.
    >
    >
    > Thank you,
    > AdonaiEchad
    >

  • Php code is not working as intended in a simple spam block solution

    Hi. I'm trying to get some simple php code (as suggested on a tutorial page I found) to work on my form submission test page in order to reduce/stop spam. However, the results so far have not quite been what I expected. Any help will be appreciated.
    Basically I used the code given in the two grey boxes on this tutorial page http://myphpform.com/form-spam.php (but had to add this <?php ... ?> around the code given in the second box, otherwise it wouldn't have worked!) for my test page, and the result was supposed to look something like shown on this page http://myphpform.com/contact.php and indeed when I previewed my page in offline mode it displayed as intended with the extra field similar to the "Access code:" as on this example page, however that's not what I got when I uploaded my page.
    What happens when I go to the live page is that as soon as it loads it gives me the message: "Wrong access code" before I even have a chance to look at the form there. It's the message the user is supposed to get when they input the suggested code incorrectly, but not when the page first loads! This is what the live test page basically looks like when I go to it http://www.scotiauk.com/contact/forms/smotsContactTest.php. I wonder what's going wrong?
    I actually noticed a short while ago, after 'viewing page source' (source code) on the live test page that the page is for some reason only displaying less than half of the html code and cuts off the rest of it (including all of the <body>) just at the point (at the end of the <head> section) where the couple of lines of php script (borrowed from the second grey box in the tutorial) were meant to be - the script that includes "Wrong access code". So I get why it shows a blank page with only that message in it but not why it removes all of the <body> code once it is live!
    Just for information, this is what the page is really meant to look like - minus the php code: http://www.scotiauk.com/contact/forms/smotsContact.html. That is the original page that I copied and tried to modify with the new code. So, any ideas will be appreciated, thanks!

    Just for information, this is what the page is really meant to look like - minus the php code: http://www.scotiauk.com/contact/forms/smotsContact.html. That is the original page that I copied and tried to modify with the new code. So, any ideas will be appreciated, thanks!
    The page that you have quoted contains an infection as the following warns.
    As far as your problem is concerned, you need to know how a from works. Have a look at this video.

  • Firefox 3 displays the php code when pages launched from dreamweaver 8

    The problem seems to relate to files opening as —
    file:///C:/localweb/ .... when sent from Dreamweaver 8.0 to Firefox
    The first html/php page loads correctly from dreamweaver as
    processed HTML, a second page linked from either an HTML or php
    page also loads correctly, but selecting any link from that or
    subsequent pages displays the full php code instead of processed
    html layout - so this appears to be a third level or greater
    problem.
    If I manually substitute -
    http://localhost/ — the problem
    does not arise.
    This is a problem with version 3 of firefox, all previous
    versions I used worked fine with both — file:///C:/localweb/
    and
    http://localhost/
    Both prefixes also appear with pure HTML sites, but they load
    and function correctly.
    Not every php site I have loads with file:///C:/localweb/, so
    I am wondering if this relates to something in the php code or
    Dreamweaver - I have conn.php set to:
    mysql_connect("localhost", "root", "") or die(mysql_error());
    I use winxp and have xampp installed - everything worked fine
    until I installed Firefox 3

    > but selecting any link from that or subsequent pages
    You are being confused by a) not understanding root relative
    vs document
    relative links, and b) not understanding how DW previews
    files.
    If I have a document with a link to an image that looks like
    this -
    <img src="/images/foo.gif"...
    That's what's called a root relative link.
    If I preview that document in DW, then the browser gets the
    document, sees
    the leading "/" and reads that as the root of the hard drive,
    since the
    browser has no idea where the root of the site is. Thus, the
    image is
    broken in the preview.
    If I have temp files enabled, then DW will secretly convert
    the file being
    previewed into a temporary file, and hand that to the
    browser. This temp
    file has had all root relative links converted to document
    relative links
    (as you will see by looking at the code in the browser), and
    has had all
    include files actually embedded in the page, and has had all
    external CSS
    and js markup embedded in the page. In other words, DW has
    made the
    document into a stand-alone page.
    If you do not have temp files enabled, all of these links
    would be broken on
    preview.
    Now - if you are using root relative links, AND you have temp
    files enabled,
    AND you click away from the previewed document, then all of
    your links will
    be broken, since DW has not made that linked file into a temp
    file. This is
    what you are seeing.
    So - if you want to click away on preview, then you must use
    document
    relative links for the site -
    <img src="../images/foo.gif"... (for example)
    These will still work on preview since the browser knows how
    to determine
    the current file's location and how to follow that path.
    Make sense?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "gbiras" <[email protected]> wrote in
    message
    news:[email protected]...
    > The problem seems to relate to files opening as ?
    file:///C:/localweb/
    > ....
    > when sent from Dreamweaver 8.0 to Firefox
    >
    > The first html/php page loads correctly from dreamweaver
    as processed
    > HTML, a
    > second page linked from either an HTML or php page also
    loads correctly,
    > but
    > selecting any link from that or subsequent pages
    displays the full php
    > code
    > instead of processed html layout - so this appears to be
    a third level or
    > greater problem.
    >
    > If I manually substitute -
    http://localhost/ ? the problem does
    not arise.
    >
    > This is a problem with version 3 of firefox, all
    previous versions I used
    > worked fine with both ? file:///C:/localweb/ and
    http://localhost/
    >
    > Both prefixes also appear with pure HTML sites, but they
    load and function
    > correctly.
    >
    > Not every php site I have loads with
    file:///C:/localweb/, so I am
    > wondering
    > if this relates to something in the php code or
    Dreamweaver - I have
    > conn.php
    > set to:
    >
    > mysql_connect("localhost", "root", "") or
    die(mysql_error());
    >
    > I use winxp and have xampp installed - everything worked
    fine until I
    > installed Firefox 3
    >

  • Error for output tax code:Tax code I4 may only contain one assignment line.

    Hi
    While posting customer invoice with output tax code, I am getting following error.
    Tax code I4 may only contain one assignment line.
    Please help me resolve.
    Regards
    Rekha

    There are quite some answered questions in this forum for this issue.
    Here is one.
    Error in Sample document (Message no. FF731)
    Also, please search the forum with the following search key words.
    Tax AND code AND may AND only AND contain AND one AND assignment AND line
    Make sure you select all posts, not just the past 90 days (the default option), and you will see quite some hits.

Maybe you are looking for

  • Vendor and customer

    Hi, I have a vendor who is also a cutomer to us. For the material supplied by him, the money which we want to pay to him should be adjusted against the materials supplied by us. How to handle this in sap. Regards, L Narasiman.

  • SQL 2005 Patch installation fail

    Hi all I am having error on installing KB2716429... currently the SQL server is build no. 9.0.5057 here following is the error 11/30/2013 09:46:45.484 ================================================================================ 11/30/2013 09:46:4

  • IR column Header value not displayed entirely during filteration

    I have a IR, when I click any column Header and it shows the list of values as a dropdown. some of them (which are larger) get cut off.. means the the entire content/value are not displayed within the dropdown. [width of dropdown is fixed and no of c

  • Error adding/importing articles to folio builder

    I'm receiving the dreaded "The Indesign file for the layout cannot be found. Please relink the article to the desired source files." My folder location is also "invalid". This is received whether I'm importing or adding to a folio. I haven't moved an

  • Help please, class starts yesterday, and I need to know if Lr 5.6 64 bit can be reset to "like new" or default. Like it's never been used!

      Hello, I need to know if it is possible to reset Lr 5.6 64 bit to default or like it was when I first downloaded it. Clean/empty/fresh. As an online college student, and using Lr for a while now, without being "Detailed Oriented," and "Methodic", I