Shanti C 106 Posting Virtuoso

you have to use another mailid in the headers only...

$mailheader .= 'BCc:some@some.com' . "\r\n";

and use one mail id in $sendto....

Shanti C 106 Posting Virtuoso

thank you...

Shanti C 106 Posting Virtuoso

you will surely get solution for your thread by referencing this url:
http://www.daniweb.com/forums/thread133380.html

Shanti C 106 Posting Virtuoso

you can use button names to differentiate:
means:

<input name="submitbouttn" type="submit">
<input name="backbutton" type="submit">

then you can use the buttons in php code:

if(isset($_POST['submitbutton']))
{
//insert queries
//header("one.php");
}
if(isset($_POST['backbutton']))
{
//header("one.php");
}
Shanti C 106 Posting Virtuoso

hello...check this:

$to      = "somw@some.com";
$from    = $_POST['email'];
$subject = "Resume Details";
$mail_body = "message body";
 $fileatt      = $_FILES['fileatt']['tmp_name'];
$fileatt_type = $_FILES['fileatt']['type'];
$fileatt_name = $_FILES['fileatt']['name'];

//echo $fileatt;
//echo "<br>".$fileatt_type;
//echo "<br>".$fileatt_name;
//exit;

$headers = "From: $from";

if (is_uploaded_file($fileatt)) {
  // Read the file to be attached ('rb' = read binary)
  $file = fopen($fileatt,'rb');
  $data = fread($file,filesize($fileatt));
  

        $semi_rand = md5( time() ); 
        $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; 
    
        $headers .= "\nMIME-Version: 1.0\n" . 
                    "Content-Type: multipart/mixed;\n" . 
                    " boundary=\"{$mime_boundary}\"";
    
        $mail_body = "This is a multi-part message in MIME format.\n\n" . 
                "--{$mime_boundary}\n" . 
                "Content-Type: text/html; charset=\"iso-8859-1\"\n" . 
                "Content-Transfer-Encoding: 7bit\n\n" . 
                $mail_body . "\n\n";
    
        $data = chunk_split( base64_encode( $data ) );
                 
        $mail_body .= "--{$mime_boundary}\n" . 
                 "Content-Type: {$fileatt_type};\n" . 
                 " name=\"{$fileatt_name}\"\n" . 
                 "Content-Disposition: attachment;\n" . 
                 " filename=\"{$fileatt_name}\"\n" . 
                 "Content-Transfer-Encoding: base64\n\n" . 
                 $data . "\n\n" . 
                 "--{$mime_boundary}--\n"; 
				 
				 $ok = @mail($to, $subject, $mail_body, $headers);
fclose($file);
}
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

thanks for ur compliments...

Yeah, he did :)

And im female....

Shanti C 106 Posting Virtuoso

hello...
you can get entire code at url, which have posted by me...
check it once...
http://www.daniweb.com/forums/thread132703.html

Shanti C 106 Posting Virtuoso

i dont know exactly...
but hope this may helps you:
http://www.informit.com/articles/article.aspx?p=27800

Shanti C 106 Posting Virtuoso

Hi,

I have a routine which reads a file using type='file'. I would like to be able to update the file and save it in the same location it came from, which would be in the C:\ directory. However, I cannot see how to get hold of the path associated with my file. Can anyone help with this?

Thanks, Dave.

i think one solution for this is:
you just get the path you have to update in database and also in folder....
just use unlink to delete the file in that folder...
then simply use update query to update the path and use your regular code to insert the file in your folder...
hope this will helps you...

Shanti C 106 Posting Virtuoso

hello restrict your delete ,update queries by putting in some if conditions like:

if(!empty($_GET['delid']))
{
//delete queries...
}
if(!empty($_GET['updateid']))
{
//update queries...    
}

if updation and deletion again done after hit f5,then no problem with them,be cause if one record delete with one id,then our delete query won't work,for the updation,same values will go by update,this is also not a problem...

For the insert query:
we have to check one field which was the unique...
like:

$qry1="SELECT * FROM `your_table`  WHERE unique_cloumn='".$_POST['value_unique_cloum']."'";
		$res1=mysql_query($qry1) or die(mysql_error());
$num1=mysql_num_rows($res1);
if($num1>=1)
{
echo "already existed....";
}
Shanti C 106 Posting Virtuoso

Great...

Shanti C 106 Posting Virtuoso

i think this is the error in your code and i have changed it to:

mysql_query("UPDATE members2 SET exp_points=exp_points+ $points WHERE username = '$username' AND game = '$game'");

i dont know exactly....

justted commented: Very helpful!!! +1
Shanti C 106 Posting Virtuoso
$sql=(SELECT $dir_search FROM 'directory' WHERE $dir_type="person" OR $dir_type="organisation")

the syntax you wrote is very wrong....
Data base cloumn names are not start with $ like $dir_search...or if it is a value post form a form ,then we have write like $_POST...
so modify your query as per:

$sql = "SELECT * FROM `directory` WHERE $dir_type LIKE '%$dir_search%'";
        $get_data = mysql_query($sql);

mentioned by mcd at the above post....

Shanti C 106 Posting Virtuoso

you have to write insert query after submit your form:
see below:

if($_SERVER['REQUEST_METHOD']=='POST') {
$qur="insert into `users`(`userid`,`password`,`email`,`title`,`fname`,`sname`,`jtitle`,`company`,`address1`, `address2`,`address3`,`town`,`postcode`,`country`,`isector`,`interests`,`telephone`,`fax`,`url`,`status`,`reg_date`)values ('".$_POST['userid']."','".$_POST['password']."','".$_POST['email']."','".$_POST['title']."','".$_POST['fname']."','".$_POST['sname']."','".$_POST['jtitle']."','".$_POST['company']."','".$_POST['address1']."','".$_POST['address2']."','".$_POST['address3']."', '".$_POST['town']."','".$_POST['postcode']."','".$_POST['country']."','".$_POST['isector']."','".$tempids."','".$_POST['telephone']."','".$_POST['fax']."','".$_POST['url']."','0', now())";
			$res= mysql_query( $qur ) ;	
}
theimben commented: Thanks for your help - !Unreal :) +1
Shanti C 106 Posting Virtuoso

here is a good seo book...
have a look on that...

Shanti C 106 Posting Virtuoso

yes...
thanks praveen...

Shanti C 106 Posting Virtuoso

hello keanan...
see this link, will help to solve your problem...
http://bestdeveloper.blogspot.com/2008/01/are-getting-spammed-while-sendig-emails.html

Shanti C 106 Posting Virtuoso

im not getting your point...
plz post it clearly...

Shanti C 106 Posting Virtuoso

Fine....

Shanti C 106 Posting Virtuoso

how it possible to searching with a text box, its not possible

hello..
i heard that its possible by saving our file content in msaccess and doing file search on that...

Shanti C 106 Posting Virtuoso

hello:
use a href link to divert into search.php what letter you wan to see the blog...
At line 8:

<td> <a href="searchbox.php?value=a">A</a> | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |Z</td>
Shanti C 106 Posting Virtuoso

thanks praveen for all your help..

Shanti C 106 Posting Virtuoso

Any ideas......??????

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

you can use triggers to update only after any insert has been done...

or simply use:

$query = "SELECT * FROM users WHERE name='$name';";
$res = mysql_query($query);
if (mysql_num_rows($res) > 0) {
// yes, pull in the user details
} else
// no, user doesn't exist
}
Shanti C 106 Posting Virtuoso

hello ,
you can use time as type for your register time.but it is in the format of 00:00:00.
As shown below:
Field Type Default
time1 time 00:00:00

i think there no type for the format 00:00

Shanti C 106 Posting Virtuoso

how to disable ctrl+c:
http://www.faqs.org/faqs/msdos-programmer-faq/part2/section-16.html

And
That shortcut is handled by the operating system. It never reaches the browser and so the browser has no opportunity to pass it to the web page.

IE only:

Add the following code to your BODY tag:

ondragstart="return false" onselectstart="return false"

Q8iEnG commented: Thanks for the big help :) +1
Shanti C 106 Posting Virtuoso

For this I use onKeyDown event. See the following code
that disables CTRL C and CTRL V.

Note that this is not enough to prevent COPY/PASTE
in a text field, since the user can use CTRL INS, SHIFT INS
or simply use the context menu (right click on text field).

<html>
<head>
<script language="javascript">

function onKeyDown() {
  // current pressed key
  var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();

  if (event.ctrlKey && (pressedKey == "c" || 
                        pressedKey == "v")) {
    // disable key press porcessing
    event.returnValue = false;
  }

} // onKeyDown

</script>
</head>

<body>
<form name="aForm">
<input type="text" name="aText" onkeydown = "onKeyDown()">
</form>
</body
</html>
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

yes.....

Shanti C 106 Posting Virtuoso

yes,
use the query with your requirement..like

SELECT *
        FROM blog_table
         WHERE blodLIKE ''".$_POST['letter']."'%'

$_POST comes from browse blogs....

Shanti C 106 Posting Virtuoso

hello..
i think you have to generate barcode pictures to use them for your lab equipment...which will read by barcode reader...it will available as open source on internet...
check this urls:
http://www.mribti.com/barcode/sample.php
http://www.phpclasses.org/browse/package/2484.html
http://www.ashberg.de/php-barcode/

Shanti C 106 Posting Virtuoso

in serach.php,,,
use your query like:

SELECT * 
FROM blog_table
WHERE blodLIKE 's%'

this query will return you all posts starts by s....

Shanti C 106 Posting Virtuoso

Hi.

Tpl is extension used by Smarty and not only for web templates. Go to Smarty to see examples what template engine is.

http://www.smarty.net/
http://en.wikipedia.org/wiki/Web_template

Shanti C 106 Posting Virtuoso

Thanks praveen for your great help...

Shanti C 106 Posting Virtuoso

you have to create database table to scraps like:

CREATE TABLE `scraps_table` (
`sid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`sender_id` INT NOT NULL ,
`rec_id` INT NOT NULL ,
`message` VARCHAR( 255 ) NOT NULL ,
`status` INT NOT NULL ,
`added_date` DATE NOT NULL 
) ENGINE = innodb;

sender_id,rec_id are comes form login table userid....

Shanti C 106 Posting Virtuoso

thanks for your quick responses above...
sorry for my bad post above...
my site is full of html and js files..
and i have one search text box,with how can i search the entire site....

Shanti C 106 Posting Virtuoso

you need to provide them to login...and use ont scraps table...then insert the scrap exchanging between them with recieverid,sender id...and show the scraps according to that ids...

Shanti C 106 Posting Virtuoso

i have one static site in html...
can any one please help to search the whole static site with search textbox...
Any ideas and help would be appreciated...

Shanti C 106 Posting Virtuoso

i have one static site...
can any one please help to search the whole static site with search textbox...
Any ideas and help would be appreciated....

Shanti C 106 Posting Virtuoso

i think you have use check box in this way....

<input name="checkboxReceipt[]" value="<?php echo $frow['id']; ?>" type="checkbox"  />
Shanti C 106 Posting Virtuoso

hello i just changed your code.it works now...
see this:

<?php
include("config.php");

echo "<form action='$regScript' method='$formMethod' name='form'>

<label><span>Full name</span>
<input type='text' name='name' id='name' class='input-text'/>
</label>

<label><span>E-mail</span>
<input type='text' name='email' id='email' class='input-text'/>
</label>

<label><span>City</span>
<input type='text' name='city' id='city' class='input-text'/>
</label>

<label><span>State</span>

<select name='state' id='state' class='selectInput'>
              <option value=''>Please select</option>
              <option value='-1'>Other</option>

<option value='AK'>Alaska</option>
<option value='AL'>Alabama</option>
<option value='AR'>Arkansas</option>
<option value='AZ'>Arizona</option>
<option value='CA'>California</option>
<option value='CO'>Colorado</option>
<option value='CT'>Connecticut</option>
<option value='DC'>District of Columbia</option>
<option value='DE'>Delaware</option>
<option value='FL'>Florida</option>
<option value='GA'>Georgia</option>
<option value='HI'>Hawaii</option>
<option value='IA'>Iowa</option>
<option value='ID'>Idaho</option>
<option value='IL'>Illinois</option>
<option value='IN'>Indiana</option><option value='KS'>Kansas</option><option value='KY'>Kentucky</option><option value='LA'>Louisiana</option><option value='MA'>Massachusetts</option><option value='MD'>Maryland</option><option value='ME'>Maine</option><option value='MI'>Michigan</option><option value='MN'>Minnesota</option><option value='MO'>Missouri</option><option value='MS'>Mississippi</option><option value='MT'>Montana</option><option value='NC'>North Carolina</option><option value='ND'>North Dakota</option><option value='NE'>Nebraska</option><option value='NH'>New Hampshire</option><option value='NJ'>New Jersey</option><option value='NM'>New Mexico</option><option value='NV'>Nevada</option><option value='NY'>New York</option><option value='OH'>Ohio</option><option value='OK'>Oklahoma</option><option value='OR'>Oregon</option><option value='PA'>Pennsylvania</option><option value='PR'>Puerto Rico</option><option value='RI'>Rhode Island</option><option value='SC'>South Carolina</option><option value='SD'>South Dakota</option><option value='TN'>Tennessee</option><option value='TX'>Texas</option><option value='UT'>Utah</option><option value='VA'>Virginia</option><option value='VT'>Vermont</option><option value='WA'>Washington</option><option value='WI'>Wisconsin</option><option value='WV'>West Virginia</option><option value='WY'>Wyoming</option>

            </select>

</label>

<br>
<br>

<label><span class='label'>1500m</span>
<input type='text' name='fifteen_hundred' id='time' class='input-text'/>
</label>

<label><span class='label'>Mile</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<label><span class='label'>3200</span>
<input type='text' name='fifteen_hundred' id='time' class='input-text'/>
</label>

<label><span class='label'>5k</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<label><span class='label'>8k</span>
<input type='text' name='fifteen_hundred' id='time' class='input-text'/>
</label>

<label><span class='label'>10k</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<label><span class='label'>15k</span>
<input type='text' name='fifteen_hundred' id='time' class='input-text'/>
</label>

<label><span class='label'>10 mile</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<label><span class='label'>20k</span>
<input type='text' name='fifteen_hundred' id='time' class='input-text'/>
</label>

<label><span class='label'>25k</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<label><span class='label'>Half</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<label><span class='label'>Full</span>
<input type='text' name='mile' id='time' class='input-text'/>
</label>

<input name='submit' type='submit' value='OK'>
</form>";

?>
Shanti C 106 Posting Virtuoso

hello use this code:

$t="select * from `yourtable` ";
$i=mysql_query($t);
$row=mysql_fetch_array($i);
 $n="select * from yourtable where id > '".$row['id']."'";
$p=mysql_query($n);
$d=mysql_fetch_array($p);//here you will get next message...
 $nextid=$d['id'];
 $previd=$row['id'];

you just pass the $nextid and $previd to your nextpage...

Shanti C 106 Posting Virtuoso

i have one idea...plzzzz implement according to your requirement...

plase call this function after your insert query has done....

echo "<SCRIPT LANGUAGE="javascript"><!--n";
echo " if(confirm("You have successfully inserted... "))";
echo "{";
echo "d.action='nextpage.php';
echo "d.submit()";
echo "// --></SCRIPT>n";

or simply use:

echo "<SCRIPT LANGUAGE="javascript"><!--n";
echo " alert ("message");n";
echo "// --></SCRIPT>n";
Shanti C 106 Posting Virtuoso

demos and sample piece of codes available on the internet...
http://www.2020software.com/kwlp/Mas%2090%20E%20Commerce
http://www.magentocommerce.com/demo

just google by different keywords...

Shanti C 106 Posting Virtuoso

hello..
add one more field to your login table like type..
and set it 1 as for superadmin, 2 for admin,3 for client...
and register that type field in your session variable like..

//some statements...
$_SESSION['user']=$row['type];

And in your pages:

if($_SESSION['user']=="1"){
     echo "Welcome Super Admin";//or use header to redirect to some page...
   else  if($_SESSION['user']=="2"){
  echo "Welcome  Admin";//or use header to redirect to some page...
       }
         else if($_SESSION['user']=="3"){
        echo "Welcome  Client";//or use header to redirect to some page...
      }
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

please clearly explain your requirement...

Shanti C 106 Posting Virtuoso

put your insert query in nthis condition:

if(isset($_POST['addbutton']))
{
//insert query
}

put your update query in this condition:

if(isset($_POST['updatebutton']))
{
//update query
}