urtrivedi 276 Nearly a Posting Virtuoso

What is format of file how data is placed

You have to user rows and columns with <table> <tr> <td> table tags

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

I am also intersted to get this answer.

urtrivedi 276 Nearly a Posting Virtuoso

In begining of static page, you must put same authentication code that you would be having for other dynamic pages.

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

both will give result but user hyphen
1) '2013-12-01'
2) as yor column is timestamp, it will only give records
which are 2013-12-31 00:00:00
any value more then that will not include for same day

Following query should work

SELECT * FROM a WHERE created_on >= '2013-12-01' AND created_on < '2014-01-01'
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

You did not mention what is the exact problem you are facing.

urtrivedi 276 Nearly a Posting Virtuoso

2 ways of doing so,
One when user write in search box, and click on search button , u can post search text to process page. and display search reslut in same or new page. this will load ur whole page

Another way is to use ajax, that u can send search text to process page when user complete typing , and show result in some section of ur page, this will not load whole page

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

You need very high resolution picuture, you you can use small pattern image multiple times in tile format

But if you use high resoulution image, it will take too much time to load

urtrivedi 276 Nearly a Posting Virtuoso

I do not convert it to <br>, because when user again try to edit html code, It will show <br> in the content itself.

So rather I used to display content when its not in textarea, using nl2br function.

<?php $content ="your saved data";?>

<textarea > <?php echo $content;  </textarea>

<div > <?php echo nl2br($content);  </div>
diafol commented: nice one +14
urtrivedi 276 Nearly a Posting Virtuoso

you try to view source after you load your page, see output of line 43 and 81 of your code, whether it is properly populated or not

 categories: [<?php echo join($data1, "','"); ?>],

   data: ['<?php echo join($data2, "','"); ?>'],
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
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

add following line before line number 90,

 echo $regex."<br>".$content."<br>".$match;
 $userID = $match[1];

site5 might have changed the source code you were matching in your code

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

Any payment gateway you chose, they provide you integration kit and manauls to integrate your website.

urtrivedi 276 Nearly a Posting Virtuoso

You can decide style in query itself , by adding one more column. This column value you can use to decide style in html

query= "(SELECT 'arc_style' record_style, judul,judul_seo,isi,id_kategori,id_sub, id_news as type FROM arc_news WHERE (judul LIKE '%".$search_string."%' OR isi LIKE '%".$search_string."%') and status='aktif')
    UNION
    (SELECT 'tutor_style' record_style,judul,judul_seo,isi,image,id_kattutor, id_tutor as type FROM tutor_news WHERE judul LIKE '%".$search_string."%' OR isi LIKE '%".$search_string."%' )";

    .
    .
    .
    .

    <div class='{$row['record_style']}' > content</div>
urtrivedi 276 Nearly a Posting Virtuoso

set your path in following vairable permentely

$_SESSION['dirname']

urtrivedi 276 Nearly a Posting Virtuoso

it starts from the root folder, any where it can be store, if you want to fix
$_SESSION['dirname'] varible for ever and do not change it on any submit

urtrivedi 276 Nearly a Posting Virtuoso

This is code I used to upload file to the selected folder and display and download file with link click

<?php

    session_start() ;
    if(is_uploaded_file($_FILES['userfile']['tmp_name']))
    {
        $currdirectory=$_SESSION['dirname'];
    }       
    else
    {
        if (trim($_POST['dirname'])=="")
            $currdirectory=dirname($_SERVER['DOCUMENT_ROOT']);
        else
            $currdirectory=$_POST['dirname'];
        $_SESSION['dirname']=$currdirectory;            
    }

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>

<script lang=javascript>
    function link_click(dname)
    {
        document.frmdir.dirname.value=dname;
        document.frmdir.submit();
    }
    function btnsubmit_click()
    {

        document.frmcsv.submit();
    }

</script>
<BODY>

<?php

    $files = scandir($currdirectory);
    print "<b><BR>{$currdirectory}</b><br>";

    if (!(substr(strrev(trim($currdirectory)),0,1)=='/' ||substr(strrev(trim($currdirectory)),0,1)=='\\'))


    print "<a href=\"javascript:link_click('".str_replace('\\','',dirname($currdirectory))."')\">Up</a><br>";
?>
<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']?>" method="POST" id=frmcsv name=frmcsv >
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="8000000" />

<input name="userfile" type="file" class='button' id='userfile'>
<input type="button" value="Upload"  id=submit1 name=submit1 accesskey='1' onclick='btnsubmit_click()' class='button'>
</form>
<?php


    print "<form method='post' name=frmdir id=frmdir action='{$_SERVER['PHP_SELF']}'>";
    print "\n<table border=0>";
    for ($i=0;$i<count($files);$i++)
    {

        $content=$currdirectory."/".$files[$i];

        if (is_dir($content) && trim($files[$i])!="." && trim($files[$i])!="..")
        {
            print "\n<tr>";       
            print "\n\t<td valign=bottom><img src='../images/folder.jpg' border=0 >   </td>";
            print "<td><a href=\"javascript:link_click('".$content."')\">{$files[$i]}</td></a>";        
            print "\n</tr>";
        }

    }

    for ($i=0;$i<count($files);$i++)
    {
         $content=$currdirectory."/".$files[$i];
        if (is_file($content))
        {
            print "\n<tr>";
            print "\n\t<td valign=center align=right><img src='../images/file.jpg' border=0></td>";         
            print "\n\t<td><a  href='file.php?filename={$content}'>{$files[$i]}</a>";
            print "\n</td></tr>";
        }

    }
    print "\n</table>";
?> 
<input name=dirname id=dirname type=hidden>
</form>

</BODY></HTML>
urtrivedi 276 Nearly a Posting Virtuoso

I want to integrate local seach engine to my website. Which open source tool is best for it, I want to search pdf files also. Will google custom search do this job.

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

http://www.php.net/manual/en/function.finfo-file.php

I guess you using > php 5.3
Based on file type you can set your image icon using switch case

urtrivedi 276 Nearly a Posting Virtuoso

1) I think when you upload, store its mimetype too separtely to identify its file type keep format standard (file table)
2) so while saving file on server and keeping its record in table save mime type also with other information.
3) then keep one table (2 columns) mimtype and icon_image_name columns (mime_table)
4) when displaying file list, join two table on mime to get icon_image_name that you can show in img tag

I hope this works for you.

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

this is not complied code, You need to check and correct if needed

<?php
    //mssql
    $link = mssql_connect('dbhost', 'username', 'password'); 
    mssql_select_db('database', $link); 

    $result = mssql_query("select salesman_code , count(*) ermcount from erm  group by salesman_code", $link); 


    while (($row = mssql_fetch_array($result, MSSQL_BOTH))) 
    { 
        $arrerm[$row['salesman_code']]=$row['ermcount'];//set emp code as array key and count as array value
    } 

    mssql_free_result($result); 
    mssql_close($link); 


    //mysql
    $con=mysqli_connect("example.com","peter","abc123","my_db");

    $result = mysqli_query($con,"SELECT a.full_name, a.erm_code, a.aimis_code,count(*) aimiscount FROM local a left outer join aimis b on a.aimis_code=b.created_by group by a.full_name, a.erm_code, a.aimis_code");

    echo "<table>";
        echo "<tr>";
        echo "<td>Fullname</td>";
        echo "<td>Customer call</td>";
        echo "<td>quotations</td>";       
        echo "</tr>";

    while($row = mysqli_fetch_array($result))
     {
        echo "<tr>";
        echo "<td>{$row['full_name']}</td>";
        echo "<td>{$row['aimiscount']}</td>";
        echo "<td>{$arrerm[$row['erm_code']]}</td>"; //using mssql array with code as key and fetch value
        echo "</tr>";
     }
    echo "</table>";
    mysqli_close($con);
?>
urtrivedi 276 Nearly a Posting Virtuoso

you forgot to increment cout, add line after number 15,

print_r($array_roll[$cout]."  ");
 $cout++
urtrivedi 276 Nearly a Posting Virtuoso

In one query its not possible

You have to create 2 connections , one for mysql and another for mssql

and loop through it

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

You can do that by using jquery, But I guess it is not good choice to do, and its not userfriendly

if any how u do that, rest options goes out of user's reach, and if user want to change his preference then he has to reset whole form to change his preference.

So I suggest you to check in javascript only.

urtrivedi 276 Nearly a Posting Virtuoso

line no 51 testing1.php should look like following

<option value=<?php echo $row['No'] ?> >
urtrivedi 276 Nearly a Posting Virtuoso

you may use chat room on this site to discuss

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

I guess courl location is column in court master , if you are storing court id, then you need not to save court location.
You can always display using sql joins, Dont not save again it in tranaction table.

urtrivedi 276 Nearly a Posting Virtuoso

what exact problem u are facing and in which page, I mean do u receive any error, or what abnormal things is happing or what is not happening, Please tell preciely

urtrivedi 276 Nearly a Posting Virtuoso

you should not post yoru pasword like this

urtrivedi 276 Nearly a Posting Virtuoso

1) You can write php script which will send reminder according to current date, on which it runs.
2) schedule that script in windows or create cron job in linux to run it on last day of the month
3) you must already have one mail server configured to handle email messages

urtrivedi 276 Nearly a Posting Virtuoso

I will go for dropdown instead of radio button

<script lang='javascript'>
function checkblank(drpid)
{
    if(document.getElementById(drpid).value=='')
    {
        alert('Select preference');
        document.getElementById(drpid).focus();
        return false;
    }
    return true;
}
function checkorder()
{
    if (!checkblank('mum'))
        return false;
    if (!checkblank('dad'))
        return false;
    if (!checkblank('doc'))
        return false;
    if (!checkblank('sib'))
        return false;

    if(parseInt(document.getElementById('mum').value)+ parseInt(document.getElementById('dad').value)+parseInt(document.getElementById('doc').value)+parseInt(document.getElementById('sib').value)!=10)
    {
        alert('Select unique preference');
        document.getElementById('mum').focus();
        return false;
    }
    return true;
}
</script>
    <form name=frm id=frm>
        <label>
            Question 1<br />
            If you`re worried or concerned about a health related issue - who are you more likely to consult first?
        </label>
        <table>
            <tr>
                <td>Mum.</td> 
                <td ><select name=mum id=mum>
                    <option value="">
                    <option value=1>1
                    <option value=2>2
                    <option value=3>3
                    <option value=4>4
                    </select> 
                </td>
            </tr>

            <tr>
                <td>Dad.</td>
                <td ><select name=dad id=dad>
                    <option value="">
                    <option value=1>1
                    <option value=2>2
                    <option value=3>3
                    <option value=4>4
                    </select> 
                </td>
            </tr>
            <tr>
                <td>Doctor.</td>
                <td ><select name=doc id=doc>
                    <option value="">
                    <option value=1>1
                    <option value=2>2
                    <option value=3>3
                    <option value=4>4
                    </select> 
                </td>
            </tr>
            <tr>
                <td>Sibling(s).</td>
                <td ><select name=sib id=sib>
                    <option value="">
                    <option value=1>1
                    <option value=2>2
                    <option value=3>3
                    <option value=4>4
                    </select> 
                </td>
            </tr>
        </table>
        <input type=button value='submit' onclick='checkorder()'>
    </form>
mmcdonald commented: Very useful, thanks +4
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