urtrivedi 276 Nearly a Posting Virtuoso

1) If You, try to open any login page in any website.

2) You enter webaddress in address bar in your browser (its your client). Rigth now ur browser is blank.

3) when you press enter , your browser sends request to the server with page name you want to open (here we want login page)

4) So server will find code page (e.g php, asp, aspx, jsp) there server code is writtten , that what is to be send to client. and some html, css, and js code is sent to browser. all this code is formated using server side lanaguages and client side code is generated dynamically for browser.

5) Now browser will receive code from server and render on your display. Now control is with browser and server will wait for ur next request.

6) You will find some checks here on your page. You can see client side code in your browser by rightclick and view source. this all is client side code (html, css)

7) If you submit without entering userid password, you will find one popup or messsage instantly that enter userid password, (using js) this is still done at client side, so browser is basically client. which helps you to communicate with the webserver (yahoo.com, or any other like that )

8) Now when you fill all details and press submit.

9) Again your server is called and ur details are send to server. And client side code contains the address of page …

urtrivedi 276 Nearly a Posting Virtuoso

First of all you must stop directory browsing (this is not related to your problem, its just security measure).

Now I can see test2.html, test.html and default.php.

Which one you are working on whose code you given above.

your server also adding javascript code for analytics, which is giving error in the bottom of page.

urtrivedi 276 Nearly a Posting Virtuoso

Session_start function is usually called in begning of page or from any common file which is included in all page in begning.

Take out it from classes

urtrivedi 276 Nearly a Posting Virtuoso
SELECT * FROM Table
WHERE  (convert(varchar,DateDeleted,1)< '2014-02-12'
OR DateDeleted IS NULL)

You should always use proper datatime datatype when value is date,
Here you have to always convert varchar to date now

refer following for sql date conversions
http://sqlusa.com/bestpractices2005/sqlserverstringtodate/

urtrivedi 276 Nearly a Posting Virtuoso

I do not agree with your html layout or I am not able to understand what you trying to achieve.

You are using same name coderef[] for different kind of of datatype, Usually html php array is used for same kind (datatype) of column for handling multiple values.

So I would suggest you to first use unique names of columns, changed handler accordingly

<li>
        <label name="idPlanRev"> Plan Review No:</label>
        <input name"planReviewId"id="planReviewId"  value="<?php  echo $id_plan_review;?>"/>
        <label name="emply"> Employee:</label>
        <input name"emply"id="emply" value="<?php echo $_SESSION['contact_id'];?>"/><!---->
        <label name="codeRef"> Code Reference:</label>
        <input name="codeRef" id="codeRef" type="text"  value=""/> 
        <label name="comment"> Comment:</label>
        <input name="comments" id="comments" type="text"  size="60" value=""/>
        <label name="date">Date:</label>         
        <input name"date"id="date" type="date" value="<?php echo date('Y-m-d');?>"/><!---->
        <input type="button" id="add" value="Add Line"/>
    </li>        
urtrivedi 276 Nearly a Posting Virtuoso

add underscore after dollor sign on light 88

wrong $POST['person_id'];
right $_POST['person_id'];

urtrivedi 276 Nearly a Posting Virtuoso
window.location='sinfo.php';
urtrivedi 276 Nearly a Posting Virtuoso

try to keep h:/path
not semicolon put it as colon and restart apache service
Though I am not sure

urtrivedi 276 Nearly a Posting Virtuoso

The problem is supervisor id 454-56-768

YOu must insert that first
I have changed sequence of insert

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('454-56-768','Robert','Lewis','17834 Deerfield Ln','Nashville','CA',NULL,'01/Jan/95',NULL,NULL);

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('123-44-345','Jim','Jason','2134 Hilltop Rd',NULL,'CA',NULL,'12/Jun/99',NULL,'454-56-768');

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('454-56-324','Richard','Lewis','34 Washington St','Mansfield','MA',NULL,'01/Jan/99',NULL,'123-44-345');

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('454-56-377','Leon','Williams','55 Washington Bld','Alexandria','VA',NULL,'04/Jan/97',NULL,NULL);
urtrivedi 276 Nearly a Posting Virtuoso

In your file you can read passed get or post variables using php arrays $_GET AND $_POST in your case, its get variable id

Now we set new link in your hangout.php as following

hangout.php

<a href='http://affiliatewebsite.com/join?id=<?php echo $_GET['id']?>' > click here to join </a>
urtrivedi 276 Nearly a Posting Virtuoso

In my view alone html is not capable of doing so.
What is your server side language?

urtrivedi 276 Nearly a Posting Virtuoso

if you can buy, try phpmaker , I think it gives what u want.

urtrivedi 276 Nearly a Posting Virtuoso
$sql="INSERT INTO admin_actions (action_done, date_accomplished, id_number, complaint_id)   SELECT 'done', current_date(),id_number, complaint_id  FROM complaints WHERE group_id=1";
ms061210 commented: Thank you for your answer. It works! :) +1
urtrivedi 276 Nearly a Posting Virtuoso

if its single file then when you store it, keep one name say cells.csv

You should updates with same name and read with same name.

urtrivedi 276 Nearly a Posting Virtuoso

you need to include the php file where class duomenubaze is declared

urtrivedi 276 Nearly a Posting Virtuoso

1) You need to write classname after keyword class
2) i removed extra comma after word "phpfil"

class myclassname
{
    function prisijungti()
    {
        $jungtis = @mysql_connect("localhost", "dancr_phpfilm", "phpfil");
urtrivedi 276 Nearly a Posting Virtuoso

mysql default format is yyyy-mm-dd and when you want to display somewhere, you can use date_format(datecolumn,'%d-%m-%Y') as mydate

for country time, you need to set timezone of your contry in the server

urtrivedi 276 Nearly a Posting Virtuoso

change query to following

$query = "INSERT INTO gallery (clientid, folder, file, filext, month, year, dateuploaded) VALUES ('$clientid', 'images/work/', '$filetitle', '$fileext', '$month', '$year', current_timestamp())";
urtrivedi 276 Nearly a Posting Virtuoso

that happned to me when file is more then the permitted size in php apache settings, even it do not show an warning,

urtrivedi 276 Nearly a Posting Virtuoso

I agree with simplypixie,

added following code for field_by_id[32] and field_by_id[14]

<?php endif; ?>
urtrivedi 276 Nearly a Posting Virtuoso

default_record_library.php

upload above file as zip

I dont see any error in code posted by you

urtrivedi 276 Nearly a Posting Virtuoso

My table structure was common, I dont add 5x5 columns in table I wil keep only 5 colums, and I will add 5 records for that

This is perfect table design

urtrivedi 276 Nearly a Posting Virtuoso

You place your single file code in the for loop i set, check all variables carefully and you are done

urtrivedi 276 Nearly a Posting Virtuoso

I am posting how i handled it, you can change as your need

First page code, I use number instead of text in file name

<input type=file name="0" class="input"  >   <br>
<input type=file name="1" class="input"  >   <br>
<input type=file name="2" class="input"  >   <br>
<input type=file name="3" class="input"  >   <br>
<input type=file name="4" class="input"  >   <br>

So in process page i can get array of file inputs

$filecount=count($_FILES);

    for($j=0;$j<$filecount;$j++)
    {   
        if($_FILES[$j]['size']<=0 ) 
            continue;
        $fileno=$j+1;
        $filetitle = $_FILES[$j]['name'];


        if($filetitle!="")
        {       
            $fileext = substr($_FILES[$j]['name'], strrpos($_FILES[$j]['name'], '.'));
            $uploaddir = "../pdf/mail_attach/";
            $max_size = "4194304";//"2621440";//"8388608";//""6291456";//"5242880";//"1048576";//"512000";//8388608

            if ($_FILES[$j]['type'] == "text/html")
            {
                $var_msg.= "Incorrect File Extension for file {$fileno}!<br>";
                $insert=false;
                break;
            }
            else
            {
                if($_FILES[$j]['size'] > $max_size)
                {
                    $var_msg.= "File Size Is Too Big for file {$fileno}! Max size is 4 MB<br>!";
                    $insert=false;
                    break;

                }
                else
                {



                    move_uploaded_file($_FILES[$j]['tmp_name'],$uploaddir.$file_name);                          





                }
            }   
        }   
    }//end file array
urtrivedi 276 Nearly a Posting Virtuoso

I assume $sourcearr is the array you shown above, your result array is $destarr

    $rowindex=-1;
    foreach($sourcearr as $key => $valuearr) 
    { 
        if ($key%4==0)
            $rowindex++;
        $value=current($valuearr);
        $destarr[$rowindex][key($valuearr)]=$value;   
    }


    echo "<pre>";
    print_r($destarr);
    echo "</pre>";
urtrivedi 276 Nearly a Posting Virtuoso

I am not sure, But do "try- catch- exception" works in php as it works in java

urtrivedi 276 Nearly a Posting Virtuoso

Dani, I guess update queries will be in batch mode and not concurrent. So to get concurrent result, I suggest to write insert/update/delete database trigger on base table to keep summary table upto date

urtrivedi 276 Nearly a Posting Virtuoso

Add vertical-align :text-top to img element

<img src="images/detail_quotegreenclosed.jpg" width="30" height="30" border="0" alt="Continuing Day Treatment Program" style="vertical-align:text-top;">
urtrivedi 276 Nearly a Posting Virtuoso

probabley your $_GET['movie_id'] is blank

in top of page add few lines to see are u getting proper values or not on ur page

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

You may also remove parenthesis around columns

urtrivedi 276 Nearly a Posting Virtuoso

You need one more parent table with 2 cells

<table border=0> 
<tr>
<td>




<center><p>
<table border="1" rules="all"  cellspacing="6" cellpadding="6" style="background-color:AntiqueWhite">
            <tr>
                <td colspan="2"><b>HOUSE</b></td>
                <td colspan="2"><b>PERSONAL</b></td>
                <td colspan="2"><b>TRANPORT</b></td>
            </tr>
            <tr>
                <td>Rent/Mortgage</td>
                <td><?php if(@$house) {echo "RM ".@$results['rent'];} ?></td>
                <td>Charity</td>
                <td><?php if(@$personal) {echo "RM ".@$query['charity'];} ?></td>
                <td>Public Transport</td>
                <td><?php if(@$transport) {echo "RM ".@$info['public'];} ?></td>
            </tr>
            <tr>
                <td>Electric Bill</td>
                <td><?php if(@$house) {echo "RM ".@$results['electric'];} ?></td>
                <td>Parents</td>
                <td><?php if(@$personal) {echo "RM ".@$query['parent'];} ?></td>
                <td>Car Insurance/Road Tax</td>
                <td><?php if(@$transport) {echo "RM ".@$info['insurance'];} ?></td>
            </tr>
            <tr>
                <td>Water Bill</td>
                <td><?php if(@$house) {echo "RM ".@$results['water'];} ?></td>
                <td>Children</td>
                <td><?php if(@$personal) {echo "RM ".@$query['child'];} ?></td>
                <td>Car Payment</td>
                <td><?php if(@$transport) {echo "RM ".@$info['pay'];}?></td>
            </tr>
        </table>
    </p></center>





</td>
<td>





<center><p>
    <table rules="all" border="1" cellspacing="6" cellpadding="6" style="background-color:AntiqueWhite">
        <tr>
            <td colspan="2"><b>MONTHLY SALARY</b></td>
        <tr>
        <tr>
            <td>Basic Salary</td>
            <td><?php if(@$sql){echo ("RM ".@$result['basic']);}?></td>
        </tr>
        <tr>
            <td>Fixed Allowance</td>
            <td><?php if(@$sql) {echo ("RM ".@$result['allowance']);}?></td>
        </tr>
        <tr>
            <td>Bonus</td>
            <td><?php if(@$sql) {echo ("RM ".@$result['bonus']);}?></td>
        </tr>
        <tr>
            <td colspan="2"><b>OTHER SOURCE OF INCOME<b></td>
        <tr>
    </table>
    </p></center>





</td>
</tr>
</table>
urtrivedi 276 Nearly a Posting Virtuoso
$(document).ready(function(radioname) {
    $("div.desc").hide();
    $("input[name$='"+radioname+"']").change(function() {
        $("div.desc").hide();
        $("#" + this.value).show();
    }).filter(function(){
        return this.checked;
    }).change();
});
urtrivedi 276 Nearly a Posting Virtuoso

I think wriring html code within script is creating problem, keeep document.write fucntion comented or write them with with normal/standard html

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

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

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

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

You must use single quote around $name

"SELECT * FROM asset WHERE name = '$name'"
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
<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