you have to use another mailid in the headers only...
$mailheader .= 'BCc:some@some.com' . "\r\n";
and use one mail id in $sendto....
you have to use another mailid in the headers only...
$mailheader .= 'BCc:some@some.com' . "\r\n";
and use one mail id in $sendto....
thank you...
you will surely get solution for your thread by referencing this url:
http://www.daniweb.com/forums/thread133380.html
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");
}
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);
}
thanks for ur compliments...
Yeah, he did :)
And im female....
hello...
you can get entire code at url, which have posted by me...
check it once...
http://www.daniweb.com/forums/thread132703.html
i dont know exactly...
but hope this may helps you:
http://www.informit.com/articles/article.aspx?p=27800
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...
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....";
}
Great...
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....
$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....
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 ) ;
}
here is a good seo book...
have a look on that...
yes...
thanks praveen...
hello keanan...
see this link, will help to solve your problem...
http://bestdeveloper.blogspot.com/2008/01/are-getting-spammed-while-sendig-emails.html
im not getting your point...
plz post it clearly...
Fine....
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...
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>
thanks praveen for all your help..
Any ideas......??????
And also check this url for reference:
http://www.xaprb.com/blog/2005/09/25/insert-if-not-exists-queries-in-mysql/
http://bogdan.org.ua/2007/10/18/mysql-insert-if-not-exists-syntax.html
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
}
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
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"
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>
hello..
read the following:
How to Disable 'View Source'
http://www.felgall.com/htmlt4.htm
http://www.encrypt-html.com/_disable_view_source.htm
http://en.allexperts.com/q/Javascript-1520/disable-view-source-1.htm
http://www.15seconds.com/howto/pg000916.htm
yes,
use the query with your requirement..like
SELECT *
FROM blog_table
WHERE blodLIKE ''".$_POST['letter']."'%'
$_POST comes from browse blogs....
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/
in serach.php,,,
use your query like:
SELECT *
FROM blog_table
WHERE blodLIKE 's%'
this query will return you all posts starts by s....
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
Thanks praveen for your great help...
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....
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....
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...
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...
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....
i think you have use check box in this way....
<input name="checkboxReceipt[]" value="<?php echo $frow['id']; ?>" type="checkbox" />
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>";
?>
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...
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";
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...
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...
}
please clearly explain your requirement...
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
}