urtrivedi 276 Nearly a Posting Virtuoso

inner join not need, just make ur where proper

UPDATE Table3.newone p, Table1 a, Table2 b
SET p.ID = a.ID
WHERE a.Title = b.Title
urtrivedi 276 Nearly a Posting Virtuoso

I hope this helps

if (s[1] != null ||  s[2] != null || s[3] != null)
{
    String sql="Delete from student where ";
    String andsql="";



    if(s[1] != null)
    {
        sql=sql+"stu_id='"+s[1]+"' ";
        andsql=" and ";
    }

    if(s[2] != null )
    {
        sql=sql+andsql+"stu_name='"+s[2]+"' ";
        andsql=" and "; 
    }



    if(s[3]!= null)
    {
        sql=sql+andsql+"Blood_group='"+s[3]+"'";

    }

    pst=conn.prepareStatement(sql);
    pst.execute();  
}
urtrivedi 276 Nearly a Posting Virtuoso

then dont use stud id, just use only condtion
blood_group='B+'

more condtion u add, less record will be deleted, if u add stud_id in condtion only 1 record will delete

urtrivedi 276 Nearly a Posting Virtuoso

delete must be done on primary key only, if you dont have primary key, then u must add one, i guess stud_id is good choice for pk,

then use only stud_id in where condtion to delte record

urtrivedi 276 Nearly a Posting Virtuoso

Pass this.value not this.form to showuser (line 35 in your code above in post 1)

<select name="users" onchange="showUser(this.value)" width="80" style="width:80px" class="autoconvert contain" datasrc="inventory.php">
urtrivedi 276 Nearly a Posting Virtuoso

where is code for testtwopart1.php, post it here

urtrivedi 276 Nearly a Posting Virtuoso

after price put comma before number (1,2.. etc)

diafol commented: thanks +14
urtrivedi 276 Nearly a Posting Virtuoso
change line number 13 with follwing line, comment your if condtion

if (in_array($loc_con1[$j], $loc_con))
urtrivedi 276 Nearly a Posting Virtuoso
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Stocklist update</title>
<link href="../css/gallery_submit.css" rel="stylesheet" type="text/css" />
<link href="../css/template.css" rel="stylesheet" type="text/css" />
<body>
   <div class="span4">
      <p>Remove Livestock</p>
   </div>

<?php
      include 'connect.php';

      if ($_SERVER['REQUEST_METHOD'] == 'POST')
      {
         if (isset($_POST['next'])) 
         {
            $selected_radio = $_POST['delete'];
    ?>
       <form class='form' action='remove2.php' method='post' enctype='multipart/form-data' name='stockupdate_form' id='stockupdate_form' style='margin-bottom:0px;'>;
          <?php
         //   if ($selected_radio == 'boids') 
            {
                $data = mysql_query("SELECT * FROM $selected_radio  ORDER BY id DESC")
                       or die(mysql_error());

                       while($info = mysql_fetch_array( $data )) 
                       { 
                          echo "<span class='span2'>";
                          echo $info['species'];
                          echo ' : ';
                          echo $info['year'];
                          echo ' : ';
                          echo $info['sex'];
                          echo ' : ';
                          echo '£';
                          echo $info['price'];
                          echo "<input type='checkbox' name='check[{$info['id']}]' />";
                          echo '<br />';
                          echo "</span>";

                       }
            }

         }
      }
      ?>
   <input type='submit' name='remove' value='Remove' />
   </form>

</body>
</html>
urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

It is ready made tool in php mysql, just , you need to download zip folder, unzip at ur server and then follow installation instructions.

urtrivedi 276 Nearly a Posting Virtuoso

This is photogallery managment link, you may like to see
http://coppermine-gallery.net/

urtrivedi 276 Nearly a Posting Virtuoso

you can write query without ` and purely in mysql rather than using part of php

$query = "SELECT * FROM  Humeur_log WHERE  prenom =  '".$prenom."' AND  nom =  '".$nom."' AND   current_timestamp >= date_add(datelog,interval 24 hour) ";
diafol commented: much better +14
urtrivedi 276 Nearly a Posting Virtuoso

I think following library is simple to manage mails with attachment
After uploading file to your server, you can add it path to attachment in email.

here is the link
http://phpmailer.worxware.com/

urtrivedi 276 Nearly a Posting Virtuoso

this may run only once when u brink mouse pointer on the div and not multiple time as it was in case of mousemove

<div id="main-wallinfo" onmouseover="javascript:loadcomms()">
urtrivedi 276 Nearly a Posting Virtuoso

user mouseover() instead of mousemove()

urtrivedi 276 Nearly a Posting Virtuoso

onmousemove="javascript:loadcomms()

this is causing repeat execution, so remove this.
when u move mouse over div it will execute.
you want to call it once, then just at the end of page write this lines

<script lang='javascript'>
    loadcomms();
</script>
urtrivedi 276 Nearly a Posting Virtuoso

Line 16 above add price in select list

"SELECT `id`,price FROM `edit`  WHERE `id`='$searchid'"

line 34 use $search_row

echo $searchid, ': The price is ', $search_row['price'], '<br />';
urtrivedi 276 Nearly a Posting Virtuoso
$stmt = $conn->prepare("SELECT * FROM users WHERE username = $username");
urtrivedi 276 Nearly a Posting Virtuoso

I am not sure, but can you try that query withou colon (:). I mean remove colon from begning of $username in query string.

urtrivedi 276 Nearly a Posting Virtuoso

so you typing ID In search box right?

urtrivedi 276 Nearly a Posting Virtuoso

I know what to post and when to post. I have not written any code for him. He is already doing. I have guided him what he is missing.

Pritaeas means some newbie looking for complete system without any efforts, like they say how to write query, how to develop library system.

Pritaeas expect them to start and put some efforts, on which we can further help newbies.

urtrivedi 276 Nearly a Posting Virtuoso

Have you read my reply above

urtrivedi 276 Nearly a Posting Virtuoso

I am adding 4 lines following line between line 11 and 14 in your update_success.php before update query, you do same

mysql_select_db("$db_name")or die("cannot select DB");

    $titel=$_POST['titel'];
    $ingrediens=$_POST['ingrediens'];
    $pris=$_POST['pris'];
    $id=$_POST['id'];



$sql="UPDATE pizza_menu SET titel='$titel', ingrediens='$ingrediens', pris='$pris' WHERE id='$id'";
$result=mysql_query($sql);
urtrivedi 276 Nearly a Posting Virtuoso

what you type in search box, do you type id say 1 or 2 or 3

or

you type description like computer, mouse, keybard

urtrivedi 276 Nearly a Posting Virtuoso

I ADDED single quote after res in get

$query = mysqli_query($con, "SELECT id,price FROM edit  WHERE id='{$_GET['res']}' ORDER BY id ");
urtrivedi 276 Nearly a Posting Virtuoso
"SELECT id,price FROM edit  WHERE id='{$_GET['res]}' ORDER BY id DESC"

order by must come after where clause

urtrivedi 276 Nearly a Posting Virtuoso

First of all you must fix search text box name to something (dont use dollor sign)
line 2 in index.php must look like (without dollor in name)

<label>Search For: </label><input type="text" name="res" />

in search.php, you query is failing becaseu i guess you using res word in query, it shold loook like following
line 6 in search.php

"SELECT id,price FROM edit ORDER BY id DESC WHERE id='{$_GET['res]}'"
urtrivedi 276 Nearly a Posting Virtuoso

I added line at line between 58 and 59 like following, copy that output of query, run that in phpmyadmin directly

$query_Recordset1 = sprintf("select * from Item where ItemID=%i",$_GET['id']);
echo $query_Recordset1;
$Recordset1 = mysql_query($query_Recordset1, $con) or die(mysql_error());
urtrivedi 276 Nearly a Posting Virtuoso

See function for attaching file. Also take care to save generated file in folder with 777 permission. then use that file to attach, i set path ../pdf/mail_attach.

<?php

    function attach_file($files,$mime_boundary)
    {


        // preparing attachments
        $message="";
        $filecount= count($files);
        for($x=0;$x<$filecount;$x++)
        {
            $filefullpath="../pdf/mail_attach/".$files[$x]['file_name'];
            $file = fopen($filefullpath,"rb");
            $data = fread($file,filesize($filefullpath));
            fclose($file);
            $data = chunk_split(base64_encode($data));
            $message .= "Content-Type: \"".$files[$x]['file_type']."\";\n" . " name=\"".$files[$x]['file_title']."\"\n" . 
            "Content-Disposition: attachment;\n" . " filename=\"".$files[$x]['file_title']."\"\n" . 
            "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n";
            if($x<$filecount-1)
                $message .= "--{$mime_boundary}\n";
        }    
        return $message;
    }


    $html2pdf->Output("../pdf/mail_attach/".$surname.'.pdf','F');

    $semi_rand = md5(time());     
    $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";     


    $files[0]['file_name']="aaa.pdf"; //filename
    $files[0]['file_title']="UserFileAAA"; // file title
    $files[0]['file_type']="application/pdf"; // mime file type

     // Add the headers for a file attachment     
     $headers ="From: {$fromemailid}\n";            

// $headers .="Return-path: {$fromemailid}\n";
$headers .= "MIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";

    $subject = $db_broad[$bindex]['mail_subject'];

    //$message ="This is a multi-part message in MIME format.\n\n";
    $message ="--{$mime_boundary}\n";
    $message .="Content-type: text/html; charset=iso-8859-1\n";
    $message .="Content-Transfer-Encoding: 7bit\n\n" ;

    $email_text=$message;

    $message .=$email_text."\n\n";


    $attachment=attach_file($files,$mime_boundary);

    if($attachment!="")
        $message .="--{$mime_boundary}\n".$attachment;          


    $sendmail = mail($toemailid ,$subject,$message,$headers,"-f".$fromemailid);

?>

urtrivedi 276 Nearly a Posting Virtuoso

first joins are fine then runing 3 times query

you must select col names youwant in select statment to avoid duplicat columsn

SELECT launh.name as lname, ......... FROM launch

then instead of col index , use column name

echo $row['lname'];
urtrivedi 276 Nearly a Posting Virtuoso

I made one change. just added strtolower function to extension

$extension = strtolower(end(explode(".", $_FILES["uploadedfile"]["name"])));

and with <20000, you can upload file upto size of 20 KB ONLY, bigger file then 20kb will not upload.

urtrivedi 276 Nearly a Posting Virtuoso

Your code is fine
only problem with conditon on line 15 above

($_FILES["uploadedfile"]["size"] < 20000)

this says your file must be bigger then 20000 bytes, if you try file smaller then this size it will not upload.

urtrivedi 276 Nearly a Posting Virtuoso

where it stucks?
do you have write permission to upload folder?

urtrivedi 276 Nearly a Posting Virtuoso

post samle file data
and your php code

urtrivedi 276 Nearly a Posting Virtuoso

this happnes, when your server has limit of some filesize, you can see in php.ini, for paramater related to file upload, you need to increase that sizes

urtrivedi 276 Nearly a Posting Virtuoso

try this

$arr = mysql_fetch_array($sql);
                                while($previous = mysql_fetch_array($sql))
                                {
                                    if(!is_null($previous) && $previous['euro'] == $arr['euro'])
                                    {
                                        $euro = '';
                                        $usd = ''; 
                                    }
                                    else
                                    {
                                        $euro = $previous['euro']-$arr['euro'];
                                        $usd = $previous['usd']-$arr['usd'];
                                        $huf = $previous['huf']-$arr['huf'];

                                        if('-'.$arr['euro'] == $euro)
                                        {
                                            $euro_ok = null;
                                            $usd_ok = null;
                                            $huf_ok = null;
                                        }
                                        else
                                        {
                                            $euro_ok = $euro;
                                            $usd_ok = $usd;
                                            $huf_ok = $huf;
                                        }

                                        $data .= '<tr><td style="width: 100px; background-color: #CCC;">'.date("d-M-Y", strtotime($arr['data'])).'</td><td>'.$arr['euro'].'</td><td>'.$this->formatare($euro_ok).'</td><td>'.$arr['usd'].'</td><td>'.$this->formatare($usd_ok).'</td><td>'.$arr['huf'].'</td><td>'.$this->formatare($huf_ok).'</td></tr>';
                                    }

                                     $arr=$previous;
                                    $i++;
                                }
urtrivedi 276 Nearly a Posting Virtuoso

try this, add 1 lines before while

$previous = mysql_fetch_array($sql)

  while($arr = mysql_fetch_array($sql))
  {
urtrivedi 276 Nearly a Posting Virtuoso

for first case your previous element is blank, you are setting it at line 30. So you must have some reference value in the begingin for $previous

urtrivedi 276 Nearly a Posting Virtuoso

I put all together with few changes

<html>
<head>
<script lang='javascript'>
    function onoff(clickedradio)
    {

            if  (clickedradio.checked && clickedradio.value=='1')
            {

                  document.getElementById("divtext").style.display="none";
            }
            else
            {
                  document.getElementById("divtext").style.display="block";
            }

    }

</script>
</head>
<body>
<fieldset id="radios">
    <td width="33" bgcolor="#00FF00" ><font face="Arial"><input type="radio" checked name="ItemName" onclick="onoff(this)" value="1"></font></td>
    <td width="33" bgcolor="#FFFF00" ><font face="Arial"><input type="radio" name="ItemName" onclick="onoff(this)" value="2"></font></td>
    <td width="33" bgcolor="#FF0000" ><font face="Arial"><input type="radio" name="ItemName" onclick="onoff(this)" value="3"></font></td>
</fieldset>

<div id=divtext style='display:none'>        <font face="Arial"><textarea id="txt1" rows="8" name="ISSUE" cols="90"> </textarea></div>

</body>
</html>
urtrivedi 276 Nearly a Posting Virtuoso

You must have mail server configured in yoru network, which ip address you can configure with ur php.

urtrivedi 276 Nearly a Posting Virtuoso

in all browsers?

urtrivedi 276 Nearly a Posting Virtuoso

Mais mon site ne s'affiche pas certains charachter françaises de ce type de texte qui est-ç, é, à etc.in place de ces charachter mon site affiche un symbole.
Que puis-je faire pour montrer ces charachter.

Copy this is it showing in your site or not

urtrivedi 276 Nearly a Posting Virtuoso

its not showing any result

what do u mean
1) no rows showed?
2) query giving any error?

you may also try withoug 10 or 15 conition as given below

SELECT `u`.`userid`, `u`.`username`, COUNT(`s`.*) AS `total_sales`
FROM `users` `u`
INNER JOIN `sales` `s` ON (`s`.`userid` = `u`.`userid` AND `s`.`status` = 'delivered')
ORDER BY `total_sales` DESC
LIMIT 10
urtrivedi 276 Nearly a Posting Virtuoso

Try this in enquiry.php
<?php

$fac=implode(",",$_GET['facility']) ;
$Body .= "Facility: ".$fac;
 echo $Body;

?>

urtrivedi 276 Nearly a Posting Virtuoso

add complete html code, where is form, submit button

urtrivedi 276 Nearly a Posting Virtuoso

you can post your whole php script here, with database sql files if any, with some sample data

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

can u post sql script of 3 table with data for that condition

urtrivedi 276 Nearly a Posting Virtuoso

I think NoDecision is having 2 inquiry.id for any one case so it is adding one more

you can try

count (distint Inquiry.ID)