R0bb0b 344 Posting Shark
<td class="font"align=center><a href="start.php?option=contact">-contact us-</a>&nbsp;&nbsp;<a href="privacy.htm" target="_NEW">-privacy policy-</a>&nbsp;&nbsp;<a href="spam.htm" target="_NEW">-spam policy-</a><br></td></tr>

^^^ line 43

Think about it this way, php is trying to tell you the correct line the error is on, But it is usually unable to if there is a syntax error because the interpreter is unable to parse the file correctly. It usually comes fairly close but not exact. What I am saying is that your first error:

Parse error: syntax error, unexpected T_STRING in /home/a3933825/public_html/require.inc.php on line 43

Cannot be diagnosed until you post all the code from require.inc.php.

R0bb0b 344 Posting Shark

and post all of your code from require.inc.php because this is not 43 lines

function footer() {
?>
<CENTER>
<table>
<tr>
<td class="font"align=center><a href="start.php?option=contact">-contact us-</a>&nbsp;&nbsp;<a href="privacy.htm" target="_NEW">-privacy policy-</a>&nbsp;&nbsp;<a href="spam.htm" target="_NEW">-spam policy-</a><br></td></tr>
</table>
</CENTER>
<?
}
?>
R0bb0b 344 Posting Shark

I usually use htmlspecialchars() on the way out of the database because they pose no threat to the database as long as you use mysql_real_escape_string() and other proper measures to ensure data security. I think this better preserves the data and eliminates possible future adjustments to the data. Another thing that I think is way underrated are sql transactions. For instance, to start a transaction you just run the sql command "begin;". At that point you can run any number of queries and none of them will be committed until you run the sql command "commit;". This allows you to run long scripts with many updates, deletes and inserts and literally have no database clean up in case something goes south, you just call "rollback;". It also makes it easy to test such scripts because you can cancel the transaction at the end by running the sql command "rollback;".

R0bb0b 344 Posting Shark

made some adjustments, probably not what you want to do with it but got it working. the problem was that in the beginning of your javascript function you are changing the display properties of some elements by ID, well the problem was that some of those elements were missing so I just threw them in there and it works now. If you use firefox's error console it will tell you this kind of stuff.

Also changed your body font css attribute to font-family since that was also giving me a parsing error.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TSS SGA Voting System - Login</title>
<style type="text/css">
body {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	font-size: medium;
	color: #FFFFFF;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
}
a, a:visited {
	color: #FFCC00;
	text-decoration: none;
}
a:hover {
	color: #FFFF00;
	text-decoration: underline;
}
#box #content #loading {
	display: none;
}
#box #content #userError, #box #content #passError, #box #content #invalidError, #box #content #usedError {
	display: none;
	color: #FF0000;
	font-size: 14px;
}
#box #content #mError, #box #content #sError, #box #content #tError {
	display: none;
	color: #FF0000;
	font-size: 14px;
}
</style>
<script type='text/javascript'>
function ValidateLogin(form)
{
	var error=false;
	document.getElementById('userError').style.display = 'none';
	document.getElementById('passError').style.display = 'none';
	document.getElementById('invalidError').style.display = 'none';
	document.getElementById('usedError').style.display = 'none';
	document.getElementById('loading').style.display = 'block';
	document.getElementById('submit').style.display = 'none';
	with(form)
	{
		if(pass.value==''||pass.value==null)
		{
			document.getElementById('passError').style.display = 'block';
			error=true;
			pass.focus();
		}
		if(user.value==''||user.value==null)
		{
			document.getElementById('userError').style.display = 'block';
			error=true;
			user.focus();
		}
		if(error==true)
		{ …
R0bb0b 344 Posting Shark

there are lots of good stuff here
http://us.php.net/manual/en/ref.xml.php

R0bb0b 344 Posting Shark

Can i simply paste the php file in the http docs or whether i need to use any apache webserver? Please clarify...

That should be fine, if it doesn't run check the file permissions.

R0bb0b 344 Posting Shark

Hi,

I am a webdesigner and don know much about php coz, my main stream is html and css. I used to use asp feedback forms for my websites. But my new website server is unix based. I think asp feedback forms are not supported in unix. Please tell me any other option for the feedback form.

Thanks
Jees

If you take the time to learn php a little you will find that the php and asp are very similar. Of course their are a few slight differences like function names and array declaration and management but all the principals are the same.

R0bb0b 344 Posting Shark

try this

$query = sprintf("select venue,count(venue) as frequency from matches WHERE Away = 'England' group by venue ORDER BY frequency DESC limit 300");
R0bb0b 344 Posting Shark

I forget if you can do "colname, *" in the column list in a select query in mysql. I know you can in postgres, sometimes I forget that mysql doesn't have as many features as postgres. You may have to list the columns that you want to include in your script in the query. Something like this

$query="SELECT date_format(date '%d/%m/%Y') AS formatted_date, name, time, comment FROM newscomment WHERE news_id='$cmid'";

and what ever other columns you want to use in your scirpt.

R0bb0b 344 Posting Shark
<?php 
   
$cmid=$_GET['id'];
   
   $query="SELECT date_format(date '%d/%m/%Y') AS formatted_date, * FROM newscomment WHERE news_id='$cmid'";
   //$test="SELECT date_format(date '%d/%m/%Y') AS formatted_date FROM newscomment";
   //$re=mysql_query($test);
$result=mysql_query($query);
$count=mysql_num_rows($result);
?>
<?php
 echo"<b> Comments <font color=brown size=> $count</font></b></font>";
 ?>
 <?php
while($row=mysql_fetch_array($result)){
             //$cmid=$row['id']; 
           $name=$row['name'];
           $time=$row['time'];
		   $comment=$row['comment'];
           //$date=$row['date'];
           //$formatted_date = $row['formatted_date'];
		 // DATE_FORMAT(your_date, "%d-%e-%Y") 
	
?>

<center>
<table width="100%" cellspacing="0" cellpadding="0" height="" border="0" align="center" bgcolor=aliceblue>
   <tr><td valign=top><?php echo"<font color=black size=><b><i>$comment</i></b></font><br>"; echo"<font color=darkblue size=><b>$name Date sent:$date at $time</b></font>"; ?></td></tr>
   
   </table>

</center>

<?php
		  }
		   
   ?>
R0bb0b 344 Posting Shark

Please i need someone who can help me Display Date from Mysql which is in format
YYYY/MM/DD to DD/MM/YYYY the code below sends data to mysql but when i`m displaying date it comes in YYYY/MM/DD.

I don't see where you are trying to pull the data from the database to incorporate it into. you need to start with a select sql clause and then loop through the results displaying each desired row.

R0bb0b 344 Posting Shark

or you could select it this way

select date_format(date '%d/%m/%Y') as formatted_date from tablename;
R0bb0b 344 Posting Shark

I've never used it with the last "/" on the dirname but this should work mkdir("/inventory/newFolder"); that is if you have write permission in the "inventory" folder.

this should also work though mkdir("../inventory/newFolder");

R0bb0b 344 Posting Shark

Thanks Robbob, thats pretty much on the money. however...

firstly im an idiot, i wanted radio buttons not checkboxes. we wont even go there!

Secondly, could we have it where each radio button has a different outcome? so if 1 is selected img 1 shows if the second button is selected then img 2 is shown...


Thanks again

Cheers...

This seems to work OK, just put your images in a folder under the document root called "rdo" and name your images to be the same as the value of the radio button, just replace the spaces with underscores.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?
$rdobuttons1 = array();
$rdobuttons1[] = "value1";
$rdobuttons1[] = "value2";
?>
<form action="<? echo $_SERVER['REQUEST_URI']; ?>" method="post">
<table cellpadding="0" cellspacing="0">
	<tr>
    	<td>Selected option below</td>
    </tr>
	<?
	foreach($rdobuttons1 as $value)
	{
		$checkedcode = "";
		$checkeddisplay = "";
		if(isset($_POST['rdoButton']) && $_POST['rdoButton'] == $value)
		{
			$checkedcode .= '<tr>
                <td>&nbsp;<img border="0" src="images/rdo/' . str_replace(" ", "_", $value) . '.jpg" /></td>
            </tr>';
			$checkeddisplay = 'checked="checked" ';
		}
		?>
    	<tr>
        	<td><input type="radio" id="<? echo str_replace(" ", "_", $value); ?>" <? echo $checkeddisplay; ?>name="rdoButton" value="<? echo $value; ?>" />&nbsp;<label for="<? echo str_replace(" ", "_", $value); ?>"><? echo ucwords($value); ?></label></td>
        </tr>
        <? echo $checkedcode; ?>
    <?
	}
	?>
    <tr>
    	<td><input type="submit" name="btnSubmit" value="Submit" /></td>
    </tr>
</table>
</form>
</body>
</html>
R0bb0b 344 Posting Shark

Hi all,

This is going to seem a very basic sort of question so here goes....
i have a form with a couple of checkboxs and what i want to do is
echo the selected checkbox. for example;

if checkbox 1 is submitted then an image will be shown in a div underneath the form when it is submitted.
and if option 2 is selected then a differnt image will be shown and so on and so on.
all in the same page without redirecting and so on.

thanks in advance...

Cheers...

This should work

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?
$checkboxes1 = array();
$checkboxes1[] = "value1";
$checkboxes1[] = "value2";
?>
<form action="<? echo $_SERVER['REQUEST_URI']; ?>" method="post">
<table cellpadding="0" cellspacing="0">
	<tr>
    	<td>Selected options below</td>
    </tr>
	<?
	foreach($checkboxes1 as $value)
	{
		$checkedcode = "";
		$checkeddisplay = "";
		if(isset($_POST['chkCheck']) && is_array($_POST['chkCheck']) && in_array($value, $_POST['chkCheck']))
		{
			$checkedcode .= '<tr>
                <td>include code here if the checkbox was selected</td>
            </tr>';
			$checkeddisplay = 'checked="checked" ';
		}
		?>
    	<tr>
        	<td><input type="checkbox" <? echo $checkeddisplay; ?>name="chkCheck[]" value="<? echo $value; ?>" /></td>
        </tr>
        <? echo $checkedcode; ?>
    <?
	}
	?>
</table>
</form>
</body>
</html>
R0bb0b 344 Posting Shark

"Chrome Not All That Shiny"
http://mt.itbusinessedge.com/dm?id=E87779C7455DD2E5300C23580D9CAA60

Yes, but being an open source project and with the resources that Google has, I'm sure it won't take long before it is. I think though that many people feel like I do in that there is no room for a company like Google in the browser market. I can use Firefox knowing that I don't have spyware and lame tool-bars from the get-go. With Google, who knows, the biggest chunk of their business is in marketing and people get enough of that as it is.

Look, its a great project with a lot of new ideas, but its just the wrong company. Maybe they will get a lot of ignoramuses using it, but the people that are tired of backing up data and cleaning and reformatting and all the other bull$%^& they have to go through to keep a system healthy will probably stay clear.

R0bb0b 344 Posting Shark

Im still using firefox as ive noticed 2-3 bugs, and you cant scroll by clicking the mouse wheel like FF can. But if they add this functionality to Chrome, I may consider switching. But what I do like is the tabbing (you can draw a tab out to make a seperate window) and incognito mode.

Actually, the way they have it set up is that each tab is like a separate process so if one tab freezes, the rest of the browser continues to work. It's a good idea, not quite enough to convince me, but a good idea none the less.

R0bb0b 344 Posting Shark

They sneak up on you:
"oh that's cool"
and
"oooh let's try that".
"Google's doing this!" and "Google's doing that!" and pretend like they are not after the entire F'N market, and then one day they are the internet gods and thou shalt not pass without Google having a hand in everything that you do online.

PLEASE, don't buy into it, they own enough of the internet, just stop. FF is an excellent open source browser if you want one.

R0bb0b 344 Posting Shark

Plus, .net goes where Microsoft wants it to go, where as PHP goes where the community wants it to go. I like the community.

R0bb0b 344 Posting Shark

How do you keep multiple javascripts from interacting and effecting each other?

thanks

Ensure that your function and variable names are unique.

R0bb0b 344 Posting Shark

OK, the following code is, probably as you already know, brings the data down from the database and adds the total number of rows of data brought down into the variable $total.

$query = "SELECT count(vote) as total, vote FROM `votes` group by vote order by vote";
$result = mysql_query($query);
$total = mysql_num_rows($result);

Next we are creating an array where the key == to its English representation(0 = "zero", 1 = "one" etc...). There may be a better way to do this, but I don't know what it might be.

$variablekeys = array();
$variablekeys[] = "zero";
$variablekeys[] = "one";
$variablekeys[] = "two";
$variablekeys[] = "three";
$variablekeys[] = "four";
$variablekeys[] = "five";
$variablekeys[] = "six";
$variablekeys[] = "seven";
$variablekeys[] = "eight";
$variablekeys[] = "nine";
$variablekeys[] = "ten";
$variablekeys[] = "eleven";
$variablekeys[] = "twelve";
$variablekeys[] = "thirteen";
$variablekeys[] = "fourteen";
$variablekeys[] = "fifteen";
$variablekeys[] = "sixteen";
$variablekeys[] = "seventeen";
$variablekeys[] = "eightteen";
$variablekeys[] = "nineteen";
$variablekeys[] = "twenty";

The next bit of code involves using this array and the values pulled from the database to create what is called a variable variable. The following code loops through each row of data and does the following with each row:
1: assign vote to $key
2: assign total number of votes to $value
3: using "vote" from the database in conjunction with our array make a variable named $variablekeys[$key] with the value of $value, meaning take the value of the associated cell of the array("zero", "one", "two" etc...) and create a …

R0bb0b 344 Posting Shark

hey again
erm.....

any ideas on how i would store each individual sum (11 votes for member number 2) in a variable ($two = 11).

Really need help with this one.

Thanks in advanced.

This should do it

<?
$query = "SELECT count(vote) as total, vote FROM `votes` group by vote order by vote";
$result = mysql_query($query);
$total = mysql_num_rows($result);

$variablekeys = array();
$variablekeys[] = "zero";
$variablekeys[] = "one";
$variablekeys[] = "two";
$variablekeys[] = "three";
$variablekeys[] = "four";
$variablekeys[] = "five";
$variablekeys[] = "six";
$variablekeys[] = "seven";
$variablekeys[] = "eight";
$variablekeys[] = "nine";
$variablekeys[] = "ten";
$variablekeys[] = "eleven";
$variablekeys[] = "twelve";
$variablekeys[] = "thirteen";
$variablekeys[] = "fourteen";
$variablekeys[] = "fifteen";
$variablekeys[] = "sixteen";
$variablekeys[] = "seventeen";
$variablekeys[] = "eightteen";
$variablekeys[] = "nineteen";
$variablekeys[] = "twenty";

for($i = 0; $i < $total; $i++)
{
	$key = mysql_result($result, $i, "vote");
	$value = mysql_result($result, $i, "total");
	
	$$variablekeys[$key] = $value;
}
?>
R0bb0b 344 Posting Shark

replace:
echo $row_test;?>

with
echo $row_test;?>

R0bb0b 344 Posting Shark

Are you sure, did you put an alert() in the function to see?

R0bb0b 344 Posting Shark

Usually when you see something like this:
arrayName.item(0)

it is referring to something in the DOM, for example:
http://jacksleight.com/blog/2008/01/14/getelementsby/

R0bb0b 344 Posting Shark

very basic version but it should get you started:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
function validateForm(inputID)
{
	if(document.getElementById(inputID).value == "")
	{
		document.getElementById(inputID + "_error").style.display = "block";
	}
	else
	{
		document.getElementById(inputID + "_error").style.display = "none";
	}
}
</script>
</head>

<body>
<table cellpadding="0" cellspacing="0">
	<tr>
		<td style="height:20px;"><div id="txt1_error" style="display:none;">TextBox 1 is blank</div></td>
		<td style="height:20px;"><div id="txt2_error" style="display:none;">TextBox 2 is blank</div></td>
	</tr>
	<tr>
		<td><input type="text" name="txt1" id="txt1" /></td>
		<td><input type="text" name="txt2" id="txt2" /></td>
	</tr>
	<tr>
		<td><input type="button" name="btnValidate1" value="Validate TextBox 1" onclick="validateForm('txt1');" /></td>
		<td><input type="button" name="btnValidate2" value="Validate TextBox 2" onclick="validateForm('txt2');" /></td>
	</tr>
</table>
</body>
</html>
R0bb0b 344 Posting Shark

Total:

select sum(`Amount`) as total from `sample`;

Total Records:

select count(`pmtID`) as total from `sample`;
R0bb0b 344 Posting Shark

I'm having a for where I can create invoices. Now I'm having the form fields where I have to fill it out with the customer's data. Well I don't want to fill out existing customer's data everytime. So I am having a link which opens up a page with a list of all existing customers. Now how can I get it to auto complete the form fields when clicking on the customer in the popup page? In other words, when clicking on a customer in the popup page, the form fields have to be auto-completed in the parent page.

You are being way too vague here, why don't you post what you have done so far and maybe someone might be able to help you.

R0bb0b 344 Posting Shark

no problem.

R0bb0b 344 Posting Shark

do a find and replace in your script for the following:
replace ‘ with '
replace ’ with '

R0bb0b 344 Posting Shark
<?
$mysql_date = "2008-08-17";
list($y, $m, $d) = explode("-", $mysql_date);
echo date("m/d", mktime(0, 0, 0, $m, $d, $y));
?>
R0bb0b 344 Posting Shark

hey

thanks for the reply

wouldnt that just collect all the votes in ascending order and store how many votes have been taken in the $one.

Or am i mistaken?

Help is really appreciated
Thanks

maybe this is what you are looking for?
This will pull the total votes for each distinct vote.

$getvotes = "SELECT count(vote) as total, vote FROM `votes` group by vote order by vote";
R0bb0b 344 Posting Shark

try this

<?php
$host=""; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name="images"; // Database name 
$tbl_name="categories"; // Table name
 
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

$sql = "SELECT id,category_name FROM categories ORDER BY category_name"; 

echo '<select name="category_name">'; 

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

echo '</select>';
?>
R0bb0b 344 Posting Shark

Not a problem, I've just heard horror stories about php 4.2 when developers had to go back through the scripts that they wrote in the past because register globals was turned off. The less of that we have in the future the better off we'll be.

Yes, that would be the best way to go.

R0bb0b 344 Posting Shark

Also, you shouldn't be using session_register() as this is registering a global variable. You will find that in most hosts, register globals is turned off and in php 6.0 it is completely removed. You shouldn't be using register globals anyway. You only need to use $_SESSION[].

So, unless you really feel like revisiting everything you've done with sessions, I recommend not doing this.

R0bb0b 344 Posting Shark

You are going to have to analyze the queries that are being sent to mysql by outputing the query to the browser and pasting it into mysql. I think that will clear this up since this doesn't make a whole lot of sense otherwise.

R0bb0b 344 Posting Shark

The only reason I used ob_start() is because you are sending the .csv header after you have posted to the page to keep from getting an error. I probably should have used ob_end_flush() as well, just didn't think of it.

And you are doing something very strange if you are seeing php code in the .csv file, which would be why it is corrupt since it is no longer in .csv format. If you read the documentation on datatypes and functions, you will see that the sql query is in the right format. While the program is in production, you should be echoing that query every time so you can see what it looks like when ever something strange happens.

R0bb0b 344 Posting Shark

made a couple of adjustments. to eliminate the "headers already sent" errors, I put ob_start() at the top of the script. Other wise, everything is as we have been talking about and it works fine for me.
connect.php

<?php
define('SQL_HOST', 'servername');
define('SQL_USER', 'username');
define('SQL_PASS', 'password');
define('SQL_DBOC', 'dbname');
define('SQL_DBM', 'mysql');

$conn=mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) OR die('Could not connect to the database. ' .				mysql_error());
mysql_select_db(SQL_DBOC,$conn) or die(mysql_error());

?>

gcrFunction.php

<?
include('./connect.php');

error_reporting(E_ALL ^ E_NOTICE);

function validateData()
{
	global $conn;
	
	$sDate=$_POST['sDate'];
	$eDate=$_POST['eDate'];
	//echo $sDate;
	//echo $eDate;

	$btn=$_POST['btnSubmit'];
		
	if(isset($btn))
	{				
		if(!$sDate)
		{
			echo '<center><font face=Verdana color=Red size="2"><b>Start Date field is empty!</b></font></center></td>
				  </tr><tr bgcolor="#ffffff"><td>
				  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFf">
				  <tr><td width="760" bgcolor="#336666" scope="col">&nbsp;</td></tr></table></td></tr><tr bgcolor="#ffffFF">
				  <td><p align="center" class="style30 style4" >&copy;ITT Department, Petrotrin. </p></td></tr></table>';
			die("Problem 1");
		}
		else if(!$eDate)
		{
			echo '<center><font face=Verdana color=Red size="2"><b>End Date field is empty!</b></font></center></td>
				  </tr><tr bgcolor="#ffffff"><td>
				  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFf">
				  <tr><td width="760" bgcolor="#336666" scope="col">&nbsp;</td></tr></table></td></tr><tr bgcolor="#ffffFF">
				  <td><p align="center" class="style30 style4" >&copy;ITT Department, Petrotrin. </p></td></tr></table>';
			die("Problem 2");
		}
		else
		{
			
			function parseCSVComments($comments) 
			{ 
				// First off escape all " and make them "" 
				$comments = str_replace('"', '""', $comments); 
				if(eregi(",", $comments) or eregi("\n", $comments)) 
				{ // Check if I have any commas or new lines 
				return '"'.$comments.'"'; // If I have new lines or commas escape them 
				} 
				else 
				{ 
					return $comments; // If no new lines or commas just return the value 
				} 
			} 
			
			// Start our query of the database 
			$query = "SELECT * FROM tsttbills where DATE_FORMAT(billDate, '%b-%e-%Y') >= '$sDate' and DATE_FORMAT(billDate, '%b-%e-%Y') <= '$eDate'";
			$sql …
R0bb0b 344 Posting Shark

The only thing that I can think of is your connection object because we have already tested your query and it works fine. I will test it tonight and post the entire working script tomorrow.

R0bb0b 344 Posting Shark

try moving the die statement onto the mysql_num_rows function since that is where it seems to be hanging up. Se if we can get an error out of it.

R0bb0b 344 Posting Shark

The only thing that I can think of is that connection script because we have been through and verified everything else.

R0bb0b 344 Posting Shark

for the time being, but a die statement after your mysql_query.

$sql = mysql_query($query, $conn) or die(mysql_error());
R0bb0b 344 Posting Shark

You know, I think you're right. that it has something to do with the resource. go ahead and substitute these two lines for your database connection.

include('./connect.php');
			global $conn;

So what I mean take your connect and select db lines from ./connect.php and paste it right there.

R0bb0b 344 Posting Shark

In Spain the working people are obligated by the state to contributed to the Roman Catholic Church whether they want or not. This is accomplished via income tax, but is not deductible. In fact, many even don't know that some of their money goes to the archives of the Catholic Church.

Speaking of taxes, check this out.
http://www.ananova.com/news/story/sm_2935937.html

R0bb0b 344 Posting Shark

In that case, this makes no sense because the whole thing should be working. You are really going to have to pound that part of the script. We have verified that the field is of date data type, have eliminated the date picker as the problem, the sql query is formatted correctly, I don't see any changes to those variables before you insert them into the query so I'm sure that the query is the same from your script. You are going to have to start from the query in your script. Add some test outputs like

echo $query . "<br /><br />" . mysql_num_rows($sql);

after your mysql_query() function.

This should be working.
:confused:

R0bb0b 344 Posting Shark

Worked perfectly fine for me in phpmyadmin(db manager program shouldn't matter), here is my test database and data and the query that I ran.
table:

CREATE TABLE `tsttbills` (
  `tsttbillspk` int(11) NOT NULL auto_increment,
  `billname` varchar(60) default NULL,
  `billphone` varchar(12) default NULL,
  `billDate` date default NULL,
  PRIMARY KEY  (`tsttbillspk`)
)

data:

INSERT INTO `tsttbills` VALUES (1, 'billy', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (2, 'steven', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (3, 'robert', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (4, 'nickie', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (5, 'robbie', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (6, 'malahni', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (7, 'bo', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (8, 'bill', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (9, 'steve', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (10, 'I', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (11, 'they', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (12, 'them', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (13, 'you', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (14, 'me', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (15, 'ed', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (16, 'joe', '9895475487', '2007-11-01');
INSERT INTO `tsttbills` VALUES (17, 'bill', '9895475487', '2007-12-06');
INSERT INTO `tsttbills` VALUES (18, 'bob', '9895475487', '2007-11-01');

query:

SELECT * FROM tsttbills where DATE_FORMAT(billDate, '%b-%e-%Y') >= 'Nov-1-2007' and DATE_FORMAT(billDate, '%b-%e-%Y') <= 'Nov-1-2007'

results:
2 steven 9895475487 2007-11-01
3 robert 9895475487 2007-11-01
4 nickie 9895475487 2007-11-01
5 robbie 9895475487 2007-11-01
10 I 9895475487 2007-11-01
12 them 9895475487 2007-11-01
14 me 9895475487 2007-11-01
16 joe …

R0bb0b 344 Posting Shark

yes

R0bb0b 344 Posting Shark

does this

SELECT * FROM tsttbills where DATE_FORMAT(billDate, '%b-%e-%Y') >= 'Nov-1-2007' and DATE_FORMAT(billDate, '%b-%e-%Y') <= 'Nov-1-2007'

get any results when you stick it in your database manager?

R0bb0b 344 Posting Shark

Ok, that's fine, leave it like that and adjust your query to that in your script:

$query = "SELECT * FROM tsttbills where DATE_FORMAT(billDate, '%b-%e-%Y') >= '$sDate' and DATE_FORMAT(billDate, '%b-%e-%Y') <= '$eDate'";
R0bb0b 344 Posting Shark

can't tell if 11-1-2007 is mm-d-yyyy or if it is dd-m-yyyy, let's use a date that will show us exactly what we are dealing with here. Do the same thing, but use the date February 1st, 2007 and post those results. This should pretty much tell us what we need to know like if months has leading 0s and if days has leading 0s etc...