Shanti C 106 Posting Virtuoso

You just write small logic in one page called login_check.php...
and you must include that file in every page where ever you want security to your page:
like:

<? include("login_check.php"); ?>

In login_check.php:

<?
session_start();
if(empty($_SESSION['user_name']))
 {
  header('location:index.php'); 
 }
?>
Shanti C 106 Posting Virtuoso

or use this:

<?php
$text_file = "hits.txt";
 
function hitCount($file) {
     $fp = fopen($file,rw);
     $count = fgets($fp,9999);
     fclose($fp);
     $fp = fopen($file,w);
     $count += 1;
     print "$count ";
     fputs($fp, $count);
     fclose($fp);
}
 
/* display it on your page */

echo 'Page hits:' . hitCount($text_file);
?>
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso
<?php
$data2 = file_get_contents("data2.txt") + "1";
$fp = fopen("data2.txt", "w");
fwrite($fp, $data2);
fclose($fp);
?>
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

For that you have to search by googleeeeeeeeee.......lots of scripts are there to implement ..
Some sites :
http://dynamicdrive.com/
http://hotscripts.com/

Shanti C 106 Posting Virtuoso

that line you have specified is ending the tr tag which i opened on below line:

while($frow=mysql_fetch_array($fres)){
									   if(($c%3)==0){ echo '<tr valign="middle">';} $c++;
Shanti C 106 Posting Virtuoso

Always welcome ............

Shanti C 106 Posting Virtuoso

yep tel me....

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

see this attachment, and change that according to your desire...

Shanti C 106 Posting Virtuoso

Generally with all server side scriptings like php,jsp our request is going to server and come back with response...For some point of views there no need to go to server,like in the example situation validations...So we are going to use client side scripting which dont waste the time....

Now the java script is become more powerful because one most technology is came with the concept of javascript ...that is ajax....by this we can communicate with the webserver with reloading the whole page...In ajax this is done by javascript...

Shanti C 106 Posting Virtuoso

where was your error????????

Shanti C 106 Posting Virtuoso

see this thread will get you the answer...
http://www.daniweb.com/forums/thread134714.html

Shanti C 106 Posting Virtuoso

post your db table...

Shanti C 106 Posting Virtuoso

Echo your insert query and tel me where the error was placed..
give me your table also...

Shanti C 106 Posting Virtuoso

Hey check this attachment,its works fine....

At the line 30 you can give your desired input and then see output...

Shanti C 106 Posting Virtuoso

This is the code:

To functions to convert integers to roman figurs and back

<?php 
    // Function that calculates the roman string to the given number: 
        function dec2roman($f) 
        { 
            // Return false if either $f is not a real number, $f is bigger than 3999 or $f is lower or equal to 0:         
                if(!is_numeric($f) || $f > 3999 || $f <= 0) return false; 

            // Define the roman figures: 
                $roman = array('M' => 1000, 'D' => 500, 'C' => 100, 'L' => 50, 'X' => 10, 'V' => 5, 'I' => 1); 
         
            // Calculate the needed roman figures: 
                foreach($roman as $k => $v) if(($amount[$k] = floor($f / $v)) > 0) $f -= $amount[$k] * $v; 
             
            // Build the string: 
                $return = ''; 
                foreach($amount as $k => $v) 
                { 
                    $return .= $v <= 3 ? str_repeat($k, $v) : $k . $old_k; 
                    $old_k = $k;                 
                } 
             
            // Replace some spacial cases and return the string: 
                return str_replace(array('VIV','LXL','DCD'), array('IX','XC','CM'), $return); 
        } 
     
    // echo dec2romen(1981); 
     
     
    // Function to get the decimal value of a roman string: 
        function roman2dec($str = '') 
        { 
            // Return false if not at least one letter is in the string: 
                if(is_numeric($str)) return false; 
         
            // Define the roman figures: 
                $roman = array('M' => 1000, 'D' => 500, 'C' => 100, 'L' => 50, 'X' => 10, 'V' => 5, 'I' => 1); 
         
            // Convert the string to an array of roman values: 
                for($i = 0; $i < strlen($str); $i++) if(isset($roman[strtoupper($str[$i])])) $values[] = $roman[strtoupper($str[$i])]; 
             
            // Calculate the sum of that array: 
                $sum …
Shanti C 106 Posting Virtuoso

See this:

<?php
echo substr("Hello world!",6);
?>

The output of the code above will be:

world!

and

<?php
echo substr("Hello world!",6,5);
?>

The output of the code above will be:

world

------------------------
You can see more string functions by googling...

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

hi,
can u please tell me how to try keith editor...

You have to place that editor folder in your virtual directory and try it...its working...
other wise copy and paste the code and place all js files in your directory...


Check this path in your local:
http://localhost/web/editor/fckeditor/_samples/html/sample09.html

Shanti C 106 Posting Virtuoso

Basically searching with database means restrict our tables with our requirement...
In my examples which i have attached here,
you can fine different types of searchings here...
For that in phonefinder page i put a hidden variable like:

<input type="hidden" name="phonefinder" value="ok">

And in search_box1 page, i have registered a session for remembering our search options ,by that i concatinated my query restriction to the session variable...
And in aftersearch page, i used all them into my query to provide with search results...


Check this attachments...post me if any problem if u find...

ALL THE BEST..
Shanti.

Shanti C 106 Posting Virtuoso

This is one type of rating...
If you like it...use this attachment...

Shanti C 106 Posting Virtuoso

hey suneee....
Can you clearly explain your thread?its better...
other wise nobody will reply you...

Shanti C 106 Posting Virtuoso

The attachments which posted by keith are very good...
It very gud job done by keith...

Shanti C 106 Posting Virtuoso

Please cut and paste the editor which is i have written in iframe.php...and place that folder editors in your working directory...and check at line 386 in iframe.php, i have placed a hidden variable..use $_POST in your sql query...
its easy to do...
let me know if any error occurs...

And i do again reattach the editor...

Shanti C 106 Posting Virtuoso

hi lydia...
check this attachment....

Shanti C 106 Posting Virtuoso
var1=document.getelementbyid('txt1').value
var2=document.getelementbyid('txt2').value
var3=Number(var1)+Number(var2)

or concentrate on eval() function in javascript by googling....

nav33n commented: Ah! Didn't know that.. +7
Shanti C 106 Posting Virtuoso

you just put your code in CODE tags....

peter_budo commented: Exactly... +9
Shanti C 106 Posting Virtuoso

Hey find this attachment...
Its simple and fine...

Shanti C 106 Posting Virtuoso

Check this code:

<script>
function comparision(){
d=document.form2;
var total="";
if(!d.contype.length){
if(d.contype.checked) {
d.check_compare.value=d.check_compare.value+d.contype.value+',';
return true;
} else {
alert("Please select check Box");
return false;
}
}
for(var i=0; i < d.contype.length; i++){
if(d.contype[i].checked) {
#
total +=d.contype[i].value + "\n";
d.check_compare.value=d.check_compare.value+d.contype[i].value+',';
}
}

if(d.check_compare.value=="") {
alert("Please select atleast one check Box");
return false;
}
}
</script>

in the next page you should do like this:
$_POST;

And one more thing you have to add one hidden field like:
<input type=hidden name="check_compare" value="check_compare"> below your form tag starts....

Shanti C 106 Posting Virtuoso

Shanti,
I tried the code you shared with me for email and I could not get it to work. Not sure why. I am going to try some other formulation of the code and see what happens. I will not be deterred. I shall find the answers.

Hey sorry...Some mistake is there in my code.
check this code will work perfectly...

1.
      if (d.email.value!=d.cemail.value) { alert("Your email and Confirm emaildoesn't match.."); d.cemail.value=""; d.cemail.focus(); return false; }

here email is your email textfield and cemail is your confirm email textfield...
place this code in your validations....

Shanti C 106 Posting Virtuoso

can clearly post your thread in detail????

Shanti C 106 Posting Virtuoso

Any other replies????????

Shanti C 106 Posting Virtuoso

Welcome......

Shanti C 106 Posting Virtuoso

Very Important Factors

1.) Use keywords in the file name of the image, such as red-widget.jpg.

2.) Make sure the image has a caption, preferably in bold, immediately above or below the image, with the keyword(s) you’re targeting.

3.) Also use the keyword(s) immediately before or after the image in the main body text on your page.

Less Important Factors (but possibly helpful)

4.) Alt text and Title element used on the image. (I’m actually testing this a bit at the moment.)

5.) Anchor text of any links pointing at the image.

6.) Trust factors (i.e., site trustworthiness, age, etc.)

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

welcome...
if u got solution make this thread as solved,then other will search solved threads....

Shanti C 106 Posting Virtuoso

Take your body field from your database and place it on your web page with your desired design....
I dont know what wrong going on your application...

Shanti C 106 Posting Virtuoso

Find this url and right side they mentioned free services:
http://www.mypagerank.net/service_sn_index

Shanti C 106 Posting Virtuoso

k.thanks praveen...
i will have a look on that...
Any more information about this,please post me....

Shanti C 106 Posting Virtuoso

Try like this:

<script language="JavaScript" type="text/javascript">
var d = document.form1;						
	function del(x)
	{
						if(confirm("You want to delete this record"))
					{
					d.submit();
					}
				
			return;
	}
        </script>
Shanti C 106 Posting Virtuoso

How could I pass this value to the javascripts for validation.

Use this format..

StartDate.setFullYear(StartDateSt);
StartDate.setFullYear(StartDateSt[0],StartDateSt[1],StartDateSt[2]);

The format which i have posted earily is for php...sorry...


Check this manual for reference:
http://www.w3schools.com/js/js_obj_date.asp

Shanti C 106 Posting Virtuoso

This code is works for me finely...You also try it....

if($HTTP_POST_FILES["rfile"]["size"] >1) {	 // for  large image 1
			$ext = substr($HTTP_POST_FILES['rfile']['name'],strpos($HTTP_POST_FILES['rfile']['name'],'.')+1);
			$ext_arr=array("txt","rtf","doc","pdf","rar","zip");
			//if (in_array($ext,$ext_arr)) { 			
				$pfile=substr($HTTP_POST_FILES['rfile']['name'],0,strpos($HTTP_POST_FILES['rfile']['name'],'.'));
				$pfile.=time();
				$pfile.=strstr($HTTP_POST_FILES['rfile']['name'],'.'); 	
				$pfile="resumes/".$pfile;			
				if(!move_uploaded_file($HTTP_POST_FILES['rfile']['tmp_name'],$pfile))
				 { $pfile=""; }
				chmod($pfile,0777); 				
			} else {		
				$pfile="";
			}

You must use this term in you form tag;;
enctype="multipart/form-data"


k...

Shanti C 106 Posting Virtuoso

Tel me what are the new includes with php5 than php4???

Shanti C 106 Posting Virtuoso

You just try to implement the inbox hyperlink and then show all messages with subject and date from the database by using while loop...
Its so simple to develop...
ALL THE BEST.

Shanti C 106 Posting Virtuoso

I have tried every solution you have given me, Shanti. It's not working. The program isn't generating any error. I think this has got something to do with the format, the javascript is getting the dates. The format it would be recieving dates would be of sort yyyy/mm/dd. That is why it can't compare the dates. Please tell me some solution so that I could compare them in this format.

Helloo,
By this code convert your date to which format you want:

$dp=$_POST['date'];
	$dp1=explode("/",$dp);
	$dp2=$dp1[2]."-".$dp1[0]."-".$dp1[1];

In the last line change format according to your application....

Shanti C 106 Posting Virtuoso

Check your system date format with database date format...means yy-mm-dd like this...
Tel me what error you got...

Shanti C 106 Posting Virtuoso

see this material will help you...

Shanti C 106 Posting Virtuoso

if u got solution,mark this thread as solved.by this others may see solved threads...