urtrivedi 276 Nearly a Posting Virtuoso

seesion and post are fine, add cookie checking to ur condition

urtrivedi 276 Nearly a Posting Virtuoso

I suggest you
1) give name and id to forms
2) put button as simple button and not as submit button
3) on click on button submit speicifi form using javascript

urtrivedi 276 Nearly a Posting Virtuoso

post submit will onways create admin on on refresh always
but cookies can be different on all refresh

urtrivedi 276 Nearly a Posting Virtuoso

yes

urtrivedi 276 Nearly a Posting Virtuoso

it happned to me , when i refresh page, as many times i refresh, it inserts, so I used cookie to stop this duplicate inserts

1) on button submit i set cookie variable to 0,
2) on proccess page code, i check if cookie is =0 then allow insert else do not allow
3) after insert set cookie vairalbe to 1, so on refresh, its do not go in insert code.

urtrivedi 276 Nearly a Posting Virtuoso

you can swap i think,change syntax accordingly pls

var savevalue=document.getElementById("serverData").innerHTML;


document.getElementById("serverData").innerHTML = newvalue;

document.getElementById("serverData").append(savevalue);
urtrivedi 276 Nearly a Posting Virtuoso

you must also pass manage variable in your post

urtrivedi 276 Nearly a Posting Virtuoso

come to shoutbox

urtrivedi 276 Nearly a Posting Virtuoso

what is name of ur html file and handler file?

urtrivedi 276 Nearly a Posting Virtuoso

try to get jquery. append function, it wil add to exiting content

urtrivedi 276 Nearly a Posting Virtuoso
UPDATE TABLE_1 LEFT JOIN TABLE_2 ON TABLE_1.COLUMN_1= TABLE_2.COLUMN_2 
SET TABLE_1.COLUMN = EXPR WHERE TABLE_2.COLUMN2 IS NULL

This is sample query refer following link

http://dev.mysql.com/doc/refman/5.0/en/update.html

But I would suggest that you should not update address in delivery,

that will changes all address in delivery table of same customer even if delivery was made to old address. So you will loose history, that where were the consigment delivered in past.

It is good to pickup new address from customer table while taking new order and not to change address of past orders.

urtrivedi 276 Nearly a Posting Virtuoso

there is nothing specific about language you use, only you have to loop and echo your data at proper placec using php tags
http://blueflame-software.com/blog/using-highcharts-with-php-and-mysql/

urtrivedi 276 Nearly a Posting Virtuoso

you have to use excel library develped in php, then you can data show in divs. refer that link

urtrivedi 276 Nearly a Posting Virtuoso
<img src='your_image.jpg' width=20px height 30px>
urtrivedi 276 Nearly a Posting Virtuoso

php code can be embeded anywhere in your page u need

<?php
//in begniing of page you can get values from server and databaase
$var1="somevalue"
?>


<html>
Value is <?php echo $var1; ?>
</html>
urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

1) you just try to find values that it post

echo "<pre>";
print_r($_POST);
echo "</pre>";

2) ALSO GIVE NAME TO your text box and use same name when renaming

<input type=text name='newname'>

.
.
.
$new=$_POST['newname'];

3) I think you have to keep directory name with filenames and ensure that web user have permission to access that directory to rename

urtrivedi 276 Nearly a Posting Virtuoso

1) in your html form , you have to create form elements, with all text boxes and update button
2) on update submit form to say process.php page
3) capture all submited html values using global $_POST or $_GET array
4) write insert/udpate query code in process.php page
5) send back error or sucess message to first page

urtrivedi 276 Nearly a Posting Virtuoso

Cereal gave you 100% solution, it will print both check and not checked values

urtrivedi 276 Nearly a Posting Virtuoso

you run regstate.php?id=28 (chose any value that is valid) in browser, see what is output?
Fisrt check problem is in javsccript or ur process page itself

urtrivedi 276 Nearly a Posting Virtuoso

1) You must concate $word. In your code u assiging new query

$word .= "INSERT INTO relation_mu_and_unit (id_drug, id_unit, priority, value, harga1, harga2, harga3, last_edit) VALUES ( $id_drug,$id_unit, $i, $value, $harga_1, $harga_2, $harga_3, NOW() );";

2) mysqli expects connection first then query, make sure you create mysqli connection.

mysqli_mutli_query($conni, $word) ;

3) for multiquery you must keep mysqli_mutli_query($conni,$word) outside for loop

.
.
.
.
      $word .= "INSERT INTO relation_mu_and_unit (id_drug, id_unit, priority, value, harga1, harga2, harga3, last_edit) VALUES  ( $id_drug,$id_unit, $i, $value, $harga_1, $harga_2, $harga_3, NOW() );";
 } // for loops ends here                                                                          
 mysqli_multi_query($conni,$word);
urtrivedi 276 Nearly a Posting Virtuoso

You must use single quote around $name

"SELECT * FROM asset WHERE name = '$name'"
urtrivedi 276 Nearly a Posting Virtuoso
 <?php
 echo $value='myname';
 ?>

 Name<input type="text" name="text1" value="<?php echo $value; ?> >">

You can learn more on

www.w3schools.com

urtrivedi 276 Nearly a Posting Virtuoso

check for syntax error in all php pages you included in ur above php file

urtrivedi 276 Nearly a Posting Virtuoso

instead of span you must use form element like text or hidden
hidden is best for your case
your element must be in between form tag

<form>
.
.
.
<type =hidden id=year name =year value='<?php echo date("Y"); ?>'>

</form>
urtrivedi 276 Nearly a Posting Virtuoso
SELECT MemberID, 
         COUNT(MemberID)  cnt
    FROM YourTable 
GROUP BY MemberID
order by cnt desc 
limit 0,1
simplypixie commented: Don't answer someone else's question when they have hijacked a thread -2
urtrivedi 276 Nearly a Posting Virtuoso

can you post sample data with 5-10 records and expected sample output from same data. give sample with multiple items with multiple orders with mutliple days

urtrivedi 276 Nearly a Posting Virtuoso
<div class="row" style="margin-left:20px;">
    <div class="grid_4">
        <div class="da-panel collapsible">
        <input type="button" class="btn btn-success" onclick="tableToExcel('testTable', 'W3C Example Table')" value="Export to Excel" style="float:right">
            <div class="da-panel-content">

            <div class="da-panel-title" style="border-top:1px solid #ccc;border-bottom:1px solid #ccc">
            <h3 style="padding-left:10px;font-weight:bold;">Staff Training Information</h3></div>

         <table  class="da-table da-ex-datatable-numberpaging" id="testTable" width="100%">
          <thead width="100%">
            <tr>
            <th width="10%">Staff ID</th>
              <th width="10%">Name</th>
              <th width="10%">Location</th>
              <th width="10%">POCT Test</th>
              <th width="10%">Initial Training Date</th>
              <th width="10%">Annual Competency Date</th>
              <th width="10%">Competency Type</th>
              <th width="1%">Next Competency Date</th>

            </tr>
          </thead>
          <tbody width="100%">
          <?php 
           include_once('database.php');
           $pdo = Database::connect();
           $sql = 'SELECT * FROM competency';

           foreach ($pdo->query($sql) as $row) {
                    $id = $row['staff_id'];
                    echo '<tr>';
                        echo '<td width="10%">'. $row['staff_id'] . '</td>';
                        $sql1 = "SELECT *FROM staff WHERE StaffID='$id'";
                        foreach($pdo->query($sql1) as $res)
                        {
                            echo '<td width="10%">'. $res['StaffName'] . '</td>';
                        }
                    echo '<td width="10%">'. $row['location'] . '</td>';
                    ?>
                        <td width="10%">
                        <?php
                             $s = $row['poct_test'];
                             $val = explode(" ",$s);
                             for ($i=0; $i<sizeof($val); $i++)
                             {
                                 $v = $val[$i];
                                 echo $v."<br/>";
                             }
                        ?>
                        </td>
                <?php
                    echo '<td width="10%">'. $row['date_of_initial_training'] . '</td>';

                        echo '<td width="10%">'. $row['annual_competency'] . '</td>';
                            echo '<td width="10%">'. $row['type_of_competency'] . '</td>';
                                echo '<td width="1%">'. $row['next_competency'] . '</td>';



                        echo '</td>';
                    echo '</tr>';
           }
           Database::disconnect();
          ?>
          </tbody>
    </table>
        </div>
        </div>
    </div>
</div>

You need to remove line 21 from your code and all lines from line 59 to 67

mushahidh commented: I just want to exclude the action column when exporting to excel. you didn't get my point. +0
urtrivedi 276 Nearly a Posting Virtuoso

When we update data from mysql to oracle
We used to kept one flag in mysql table say record_status=U when there in any change in record in mysql
So cron will look for such records where record_status ='U' and only those record is updated in oracle.
After updating oracle this flag is set to NULL

Same way when mysql have new record, record_status is set to I and after inserting such record to oracle flag is again set to NULL

urtrivedi 276 Nearly a Posting Virtuoso
select 
year(created_at) as year, 
month(created_at) as month, 
day(created_at) as day, 
item_sdb_id,
price_per_unit
from 
    (select 
    l.item_sdb_id, 
    avg(l.list_price) / sum(l.quantity) as price_per_unit,
    l.created_at 
    from listings as l 
        inner join 
    purchases as p on 
    l.purchase_id = p.id 
    where l.item_sdb_id 
    and p.created_at > '2013-07-09' group by l.item_sdb_id,l.created_at) 
as t1
group by year, month, day

I assume that your listing table have multiple entries for item_sdb_id for each day.
So I am diving that day average list price with the total quantity of that day

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

Only you need one query as following

$state_id=$_REQUEST['state_id'];

$query="select tbl_city.city_name,tbl_states.state_name  FROM tbl_city INNER JOIN tbl_states ON  AND tbl_city.state_id=tbl_states.state_id where tbl_states.state_id='$state_id' "
urtrivedi 276 Nearly a Posting Virtuoso

action="" is missing
where is action page which acutally sends mail

urtrivedi 276 Nearly a Posting Virtuoso

We do same in our enviroment. Following is our case
1) out of 100% tables in database, we need just 20% tables to show on website.5% are to be updated back to oracle.
2) We create similar data tables in mysql.
3) we set up cron job in php script (on web interface) (1 script per table). this script connect to both mysql and oracle
3a) small tables are delete completely and all records are updated from oracle to mysql
3b) large tables are checked for update or insert and only those records are updated or inserted to mysql
3c) same way some table are updated from web and oracle depending on last update

4) we schedule all cron script to run at night (once in 24 hours)
5) at last we run one more php script which compares number of records in both databases, if any mismatch found in any table mail is sent to administrator.

urtrivedi 276 Nearly a Posting Virtuoso

you can create procedure in backend

delete from a;
delete from b;
delete from c;
commit;

Put that code in proper oracle procedure syntax, also make sure sequence of table must also according to the foreign key relation among them. I mean delete detail table first then master afterwards.

urtrivedi 276 Nearly a Posting Virtuoso

post your work so far,
later you cant use jquery to fetch data without reloading whole page

urtrivedi 276 Nearly a Posting Virtuoso

you need to learn embeeding php code with html to show dynamic data.

what u mean by google database?

urtrivedi 276 Nearly a Posting Virtuoso

enum needs values to be passed

urtrivedi 276 Nearly a Posting Virtuoso

You need to use parsetFloat function everywhere
http://www.w3schools.com/jsref/jsref_parsefloat.asp

nValue12 = paserFloat(document.getElementById("noofnights6").value);
       nValue13 = parseInt(document.getElementById("rate6").value);
urtrivedi 276 Nearly a Posting Virtuoso

u want to insert or select?

urtrivedi 276 Nearly a Posting Virtuoso

Though once you update data, any new request to your page will present current data only

But somebody is monitoring page, then need to refresh the result section automatically.

For that jquery request can be sent very few mintes say, 5 mintes. You can set timer function in your page which will send request to server every five minutes and updates the result section of your page. And json is good format to send/read

urtrivedi 276 Nearly a Posting Virtuoso

Can you post your table structure.

Instead of join you may try implode, see how it works

urtrivedi 276 Nearly a Posting Virtuoso

In the begning of your page add 2 lines, It will show error if any

error_reporting(E_ALL); 
ini_set("display_errors", 1); 
urtrivedi 276 Nearly a Posting Virtuoso

you need to have real ip, then firewall and dns seetings

if you can do all this then you can publish your system to online world

urtrivedi 276 Nearly a Posting Virtuoso

www.0fees.net

this is one of the free domain abailable, register and have your free online server with name like

eospaks.0fees.net

urtrivedi 276 Nearly a Posting Virtuoso
window.setTimeout(hello,3000);
function hello(){
    alert("ju");
}

Call back function can not be called , what u have written with () is calling function.

Just pass name of function.

urtrivedi 276 Nearly a Posting Virtuoso

its loooks like configuration of session in php.ini

session cookies are need to set, session directory must be writable by script and other issues.

you read that link?

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

in other pages where it is not working u say,

After session_start();

add following lines

echo "<pre>";
print_r($_SESSION);
echo "</pre>";

See what is output

urtrivedi 276 Nearly a Posting Virtuoso

I am not sure about jsp, but I put exit statement after header redirection line.

<?php
    header("location:gopage.php");
    exit;
?>

So Try to exit the page with proper syntax, I hope that will work.