Shanti C 106 Posting Virtuoso

can u post your table structure...

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

this error will occur at the times of:

1.any space is there before the session_start(); function..Means it sholu be the first line of your application...
2.dont use session_start(); as twice (in your main application and in your included application)

Shanti C 106 Posting Virtuoso

hello try this:

#
while(mysql_fetch_assoc(mysql_query($sql)) )) {
echo '<option value="'.$row['id'].'">'.$row['category_name'].'</option>';

}
Shanti C 106 Posting Virtuoso

yes...
remove the line: $truedata = mysql_fetch_array()

Shanti C 106 Posting Virtuoso

first you have to gather all checked check boxes...
see this will help you..
http://www.tizag.com/mysqlTutorial/mysqltables.php

ask me any doubt...

saikishore commented: nice performance +1
Shanti C 106 Posting Virtuoso

ya,this is the continuation code for the above post...
after getting all check boxes you checked,then write this query to delete them(checked)

if(isset($_POST['check_compare']))
{
$tempids=$_POST['check_compare'];	
echo $tempids;

$ser_qry="delete  from sometable where find_in_set(p_id,'".$_POST['check_compare']."')";
$ser_res=mysql_query($ser_qry);


}
Shanti C 106 Posting Virtuoso

first,create a table according to your requirements...
then if there any problems occured,then post erros,somany will help you...
if you dont have an idea about creating table...see this:http://www.tizag.com/mysqlTutorial/mysqltables.php

Shanti C 106 Posting Virtuoso

hello..
see that code is not for validating...
for checking checkboxes only...
its working fine for me...

Shanti C 106 Posting Virtuoso

see this code will work at this url:
http://www.daniweb.com/forums/thread134908.html

Shanti C 106 Posting Virtuoso

hello try this code will work perfectly:

function confirm_delete(x) {
var answer=confirm("Are You Sure You Want to Delete ?");
if(answer==true)
{ 
		window.location.href="delete.php?id="+x;
		} 
		return;
}
Shanti C 106 Posting Virtuoso

i saw this error on your admin.php page..

Warning: Cannot modify header information - headers already sent by (output started at /home/peipians/public_html/yackub/admin_home.php:23) in /home/peipians/public_html/yackub/admin_home.php on line 131

For this you simply add ob_start(); at stating lines of your php code...

And coming to your thread ,you can pass your primary key of your message on hyper link like:

<a href="some.php?viewid=code for id" >code for showing message</a>
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

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

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

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

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

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

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,
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

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

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
Shanti C 106 Posting Virtuoso

Hello Mr.Rakesh...

Please go through this attachment...
let me know if any problem....

Shanti C 106 Posting Virtuoso

yes,put the above code after your insert query....

Shanti C 106 Posting Virtuoso

see line 364:
change that a href line to:

<a href="javascript:delpost('<?=$postrow['post_id']?>')" class="forgot" >Delete</a>

tel me whats your error exactly...

Shanti C 106 Posting Virtuoso

Hi, thanks for your support.
But where i must put this codes ?
Are in a variable ?

Thanks

Fine..
no,any where in your html code...means, any where in your page inside html tags...

Shanti C 106 Posting Virtuoso

This can achieve by simple java script function:
this is your table having some design:

<table width="291" id="prl" style="display:none">
      <tr>
      <td width="95">message</td>
      <td width="196"><input name="message" type="text" id="message" ></td>
       </tr>
       <tr>
        <td>name</td>
        <td><input name="name" type="text" id="name"></td>
        </tr>
      </table>

This the the link to show or hide your content:

<a href="#" onClick="toggle_it('prl')">show</a>

and also
include this script in your page:

<script language="javascript">
       function toggle_it(itemID){
        // Toggle visibility between none and inline
        if ((document.getElementById(itemID).style.display == 'none'))
        {
   document.getElementById(itemID).style.display = 'inline';
  
      } else {
  document.getElementById(itemID).style.display = 'none';
  
      }
        }
      </script>
Shanti C 106 Posting Virtuoso

Tell me in which purpose ,your are doing this requirement....then we will go to another way...

Shanti C 106 Posting Virtuoso

heloo try this:

if(true)
{
	echo '<script language="javascript">startFunction();
</script>';

}
Shanti C 106 Posting Virtuoso

i think you didnt provide password on line:

$conn = mysql_connect('localhost', 'root', '');

or simply use this code below:

<?php
mysql_connect('localhost', 'username', 'password') ;
mysql_select_db('dbname');
?>
Shanti C 106 Posting Virtuoso

post your getDisplayName('$id') function code.....

Shanti C 106 Posting Virtuoso
<a href="javascript:del('passing variable')" >JS function</a>
Shanti C 106 Posting Virtuoso

these are some downloads...
have a look on that...

Shanti C 106 Posting Virtuoso

this is correct one:

SELECT * FROM autoalto_mail as a1, autoalto_contractor_sentitems as a2 where a1.flag='1' and a2.flag='1'";
Shanti C 106 Posting Virtuoso

k..

Shanti C 106 Posting Virtuoso

naveen, please tel me the difference between your post and my post....

Shanti C 106 Posting Virtuoso

That will just redirect the page once the button is clicked. To post the form data to different scripts depending upon the button clicked, you need to make use of javascript.

ok naveen...
i have understand the thread in that way..

Shanti C 106 Posting Virtuoso

change your query to:

$query1="SELECT * FROM autoalto_mail where mail_id='".$mailid1."' AND flag='1'";
Shanti C 106 Posting Virtuoso

you just give different names to your buttons like:

<input type="submit" name="b1">
<input type="submit" name="b2">
<input type="submit" name="b3">

then at the top of your page:
do like this:

<?
ob_start();
if($_POST['b1'])
{
header("location:one.php");
}
if($_POST['b2'])
{
header("location:two.php");
}
if($_POST['b3'])
{
header("location:three.php");
}
Shanti C 106 Posting Virtuoso

You can do it with DATEADD, directly in MySql

SELECT DATEADD(...) AS IncrementedDate from ...
DATEADD("2000-12-01",INTERVAL 1 DAY)

Shanti C 106 Posting Virtuoso

you can use joins for this:

"select * from table1 as t1,table2 as t2 where ti.id=t2.id";

this is simple....
Have look on this url follows:
http://www.tizag.com/mysqlTutorial/mysqljoins.php

Shanti C 106 Posting Virtuoso

so you dont have any colums with that name $_POST in you table...

first execute your query in mysql with the same name,and put in your php page...

Shanti C 106 Posting Virtuoso

change this :

$query = "SELECT * FROM runners WHERE id = '$name'";

To:

$query = "SELECT * FROM runners WHERE id =".$name;