nav33n 472 Purple hazed! Team Colleague Featured Poster

Set is a mythological god in Age of mythology.

nav33n 472 Purple hazed! Team Colleague Featured Poster
$sql="select * from table where (start_date between '$start_date' and '$end_date') or (end_date between '$start_date' and '$end_date')";

considering start_date and end_date are the columns of your table, the first condition will fetch the records if the start_date lies between the range of $start_date and $end_date (the user's input). similarly, it checks if end_date lies between the range.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I used

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT');
header('Cache-Control: cache');
header('Pragma: no-cache');
header('Cache-Control: post-check=0, pre-check=0', false);

and it worked for me!

nav33n 472 Purple hazed! Team Colleague Featured Poster

you are welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
$reg = '/<h4>(.*)<\/h4>/s';
$data="<h4><font color=\"#FFFF00\">CALVARY BAPTIST CHURCH, 334-585-6455<br>
310 DOTHAN ROAD, ABBEVILLE AL 36310</font></h4>";
preg_match($reg,$data,$matches);
print $matches[1];
?>

Phew! finally. I hope this works.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I am not sure, but this might work. Give it a try. put all the values in a table specifying table width=100% . Use css to create printer friendly pages !
http://articles.techrepublic.com.com/5100-22-1050180.html#

Hope it helps.

nav33n 472 Purple hazed! Team Colleague Featured Poster

<h4 Bla Bla Bla Bla Bla Bla
Bla Bla Bla Bla Bla
Bla Bla Bla Bla Bla Bla
Bla Bla Bla Bla </h4>

Aren't you saving this in a variable or something ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

have you set the time for cache expiry ? We have discussed the same thing in this thread. http://www.daniweb.com/forums/thread99489.html . Try doing the same ! If that doesn't help, well, we have to wait for a php expert to answer.
Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

Using ryan_vietnow's pattern, you can get the string between <h4> and </h4>.

<?php
$x="<h4>blah blah blah</h4>";
$reg = '/<h4>(.+)<\/h4>/';
preg_match($reg,$x,$matches);
print $matches[0];
?>

If you wanna learn more bout regular expression, Here is the video tutorial.

P.S. ryan_vietnow, thanks. I was scratching my head over the same thing for sometime now !

nav33n 472 Purple hazed! Team Colleague Featured Poster

maybe you should check previous posts. But anyway, when you submit a form(for example,form1.php), post all the variables to another page(form2.php), add those variables to another variable, say $message and use mail function to send the mail. More on mail function Here.

nav33n 472 Purple hazed! Team Colleague Featured Poster

hours of sleep is good for body, atleast seven hours.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Dont disable it. make it readonly.
<input type="text" name="name" value="somevalue" readonly> .

nav33n 472 Purple hazed! Team Colleague Featured Poster

nonsense indeed ! I need to get some sleep.

nav33n 472 Purple hazed! Team Colleague Featured Poster

good things happen to good people, are you good enough ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Man! Its 3 am and i am still awake!

nav33n 472 Purple hazed! Team Colleague Featured Poster
if ($show_MYK_PAYPAL == true) {

That should be

if ($show_MYK_PAYPAL == "true") {
nav33n 472 Purple hazed! Team Colleague Featured Poster

START...Ed, i told you to Start!


P.S. I don't think a sentence can begin with "started".

nav33n 472 Purple hazed! Team Colleague Featured Poster

mindgames are not fun anymore.

nav33n 472 Purple hazed! Team Colleague Featured Poster

one day internationals or ODI's are boring these days.

nav33n 472 Purple hazed! Team Colleague Featured Poster

All work and no play makes Jack a dull boy.

nav33n 472 Purple hazed! Team Colleague Featured Poster

hmm.. well, i am kinda lost too. But, If you can use javascript, try location.href="status.html". Some other alternatives (?). Try
<META HTTP-EQUIV="EXPIRES"
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT"> or, you can redirect to another page, say, page1.html and then, redirect back to status.html. :icon_mad:

If no-cache doesn't work, then i don't know what will ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Running the following code will list everything properly. But it lists EVERY row from the database.
$query = "SELECT * from tblQuotes, tblTitles WHERE tblQuotes.Serial = tblTitles.Serial";

The above query is perfect and i dont know WHY it lists every row !

nav33n 472 Purple hazed! Team Colleague Featured Poster

yep or fetch the email address from a table.

nav33n 472 Purple hazed! Team Colleague Featured Poster

no matter what you use, if you are testing it locally, you will get 127.0.0.1

nav33n 472 Purple hazed! Team Colleague Featured Poster

yep.. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

why don't you have the same thing in your result page ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

It can't be true.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You mean like this ?

<html>
<head>
<script type="text/javascript">
function printpage() {
	window.print();
	return false;
}
</script>
</head>
<body>
<form onsubmit="javascript: return printpage();">
This is the result page. 
<INPUT TYPE="submit" name="submit" value="Print">
</form>
</body>
</html>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Ok..this might look a lil complicated, but it works.

<?php
$conn=mysql_connect($host,$user,$pass);
mysql_select_db($db);
if(isset($_GET['col']) && isset($_GET['order'])){
	$column=$_GET['col'];
	$order=$_REQUEST['order'];
	if($column == "blah1"){
		if($order=="asc"){ $order="desc"; } else { $order="asc"; }
		$value1="?col=blah1&order=$order";
		$query="select col1,col2,col3 from table order by $column $order";
	}
	if($column == "blah2"){
		if($order=="asc"){ $order="desc"; } else { $order="asc"; }
		$value2="?col=blah2&order=$order";
		$query="select col1,col2,col3 from table order by $column $order";
	}
	if($column == "blah3"){
		if($order=="asc"){ $order="desc"; } else { $order="asc"; }
		$value3="?col=blah3&order=$order";
		$query="select col1,col2,col3 from table order by $column $order";
	}
} else {
	$value1="?col=blah1&order=asc";
	$value2="?col=blah2&order=asc";
	$value3="?col=blah3&order=asc";
	$query="select col1,col2,col3 from table";
}
$result=mysql_query($query);
?>
<html>
<body>
<table border=1>
<th><a href="testtab.php<?php echo $value1 ?>">blah1</th><th><a href="testtab.php<?php echo $value2 ?>">blah2</th><th><a href="testtab.php<?php echo $value3 ?>">blah3</th>
<?php
while($row=mysql_fetch_array($result)){
	print "<tr><td>".$row['col1']."</td><td>".$row['col2']."</td><td>".$row['col3']."</td></tr>";
}
?>
</table>
</body>
</html>

Hope it helps.
Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

can you explain a little bit more ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

<br> is to give a line break. That doesnt make any difference. Do you want indian time to be put in a text box ? Try this.

<html>
<body>
<?php
$time_now=mktime(date('h')+5,date('i')+30,date('s'));
$time_now=date('h:i:s A',$time_now);
?>
Time: <input type="text" name="dat1" value="<?php echo $time_now; ?>">
</body>
</html>
nav33n 472 Purple hazed! Team Colleague Featured Poster

fail-ure is the stepping stone to success !

nav33n 472 Purple hazed! Team Colleague Featured Poster

first of all, what is shorting a table ? secondly, what are containers ?
Sorry for my ignorance, I didn't understand your question.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I am getting the right output. i am getting 03:14:16 PM which is the right time.

$time_now=mktime(date('h')+5,date('i')+30,date('s'));

date('h')+5 will add 5 hrs to UTC time.
date('i')+30 will add 30 mins to UTC time.

Since we are 5-30 hrs ahead of UTC time, i am sure this will work. It probably wont work if you have set some other timezone. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
$date1="2007-11-04";  //date 1 smaller than the 2nd date
$date2="2007-12-06";
$difference= (strtotime($date2) - strtotime($date1))/(24*60*60);
print $difference;
?>

Hope it helps.

nav33n 472 Purple hazed! Team Colleague Featured Poster

why would it update when you are not changing anything ? You should have a form to make the changes. Here, you are just fetching the record from the table, putting it in a textbox, then giving a link with the same value. Try this instead.

<?php  //page1.php
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die("unable to connect");
$x = $_GET['name'];
$result=mysql_query("SELECT * FROM table1 where name='$x'") or die("ERROR:".mysql_error());
$row=mysql_fetch_array($result,MYSQL_ASSOC); //since it returns only 1 row.
print '<form method="POST" action="page2.php">';
print '<input type="hidden" name="oldname" value="'.$x.'">';
print 'Name<input type="text" maxlength="19" size="53" name="name" value="'.$row['name'].'" />';
print '<input type="submit" name="submit" value="Update">';
mysql_close($link);
?>

<?php //page2.php
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die("unable to connect");
$old_name=$_POST['oldname'];
$new_name=$_POST['name'];
mysql_query("UPDATE table1 SET name='$new_name' where name='$old_name'") or die("ERROR:".mysql_error());
echo "thanks";
mysql_close($link);
?>
nav33n 472 Purple hazed! Team Colleague Featured Poster

again ? Not again!

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
$time_now=mktime(date('h')+5,date('i')+30,date('s'));
 print "<br>".date('h:i:s A',$time_now);
?>

Thats for php.

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

well, thats because, you are probably testing it locally, like, http://localhost/ip.php and most probably, while configuring apache, you have given IP as 127.0.0.1 (or localhost). Try putting it on a server and check. It will work. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

$_SERVER is used to get the IP address of a client.

More about it Here

nav33n 472 Purple hazed! Team Colleague Featured Poster

This might help.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Umm.. I didnt get you. Do you type this query in phpmyadmin/mysql prompt directly without using a php interface ? How do you generate a BIRT report ?What I said was, remove the condition and a.price_type='P' . Then compare the result with the price_type.

nav33n 472 Purple hazed! Team Colleague Featured Poster

>- Marlboros

since when is that food?

heh! Some people smoke a cig and skip the meal. umm..so! there.. *I guess*

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
header('Cache-Control: no-cache, no-store, must-revalidate'); //HTTP/1.1
header('Expires: Sun, 01 Jul 2005 00:00:00 GMT');
header('Pragma: no-cache'); //HTTP/1.0
?>

Use the above code to tell the browser not to cache the page.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You have mail function in php to send the mail.
http://in2.php.net/manual/en/function.mail.php and its straight forward.

nav33n 472 Purple hazed! Team Colleague Featured Poster

world war II was a disaster.

nav33n 472 Purple hazed! Team Colleague Featured Poster

not if you are a parka

-0 doesnt exist btw

:( i know.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Insanity: relatively permanent disorder of the mind.

http://wordnet.princeton.edu/perl/webwn?s=insanity :icon_rolleyes:

nav33n 472 Purple hazed! Team Colleague Featured Poster

rules are meant to be broken.

nav33n 472 Purple hazed! Team Colleague Featured Poster

If you want current date and time to insert to a table, you can use now() function of mysql.

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_now