vibhaJ 126 Master Poster

Ohh man... Big code.
Try to minimize your question thread.
You will get more answers.Its bit tidy to read all your code.

vibhaJ 126 Master Poster

suppose a user check the checkbox & there is some validation error while submiting,
Are you validating form in PHP side?

vibhaJ 126 Master Poster

I know its your first post, but at least should have sense how would people know your problem without describing.
And yeah have practice with code tag to post code.

vibhaJ 126 Master Poster

Your email mime type is text, you need HTML type in header.

$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
karthik_ppts commented: helpful +4
vibhaJ 126 Master Poster

Logic is the thing which can be improved practice by practice.
There is no such technique to achieve it.
The more you can think and try different way of coding more you have grip over programming.

vibhaJ 126 Master Poster

JS is one of my favorite.
You can simultaneously check JS form validation
e.g. email validation, password validation, string limit, checkbox-radio button validation.
How to toggle any html data on any event like user select any drop down value and div's content is changes based on selected value.

Have a look with combination of php + js => AJAX.

vibhaJ 126 Master Poster

Truly speaking i haven't used older versions so practically m not aware.
But theoretically php5 is more on object oriented programming like instance, constructor etc.Latest version also offers its own improvements and add-ons.

Some of the php functions are depreciated from php 5.
By referring php.net you will see that difference. example http://in.php.net/manual/en/function.mysql-escape-string.php

Some of google links:

-http://www.dedicatedserverhosting.com/2010/10/20/differences-between-php4-and-php5/
-http://phpguru.biz/blog/find-php-tutorial/what-is-main-difference-between-php4-and-php5/
-http://tycoontalk.freelancer.com/php-forum/78717-differences-between-php4-and-php5.html

vibhaJ 126 Master Poster

Just a random hour have nothing to do with time function.

<?
echo rand(1, 12);
?>

OR do you want random date?

vibhaJ 126 Master Poster

so final code is:

<?php

$totala ="0";
$numrows ="10";

//QUERY
$extract = mysql_query("SELECT * FROM invoicedata WHERE invnum='$invnumber' limit 0,10");

//FIND DATA AND ASSIGN
while ($row = mysql_fetch_assoc($extract))
{
$items = $row['item_description'];
$prices = $row['item_price'];
$quant = $row['item_quantity'];
$itemvat = $row['item_vat'];

$subanswer = $prices * $quant;
$totala = $totala + $subanswer;

$prices = number_format($totala,2);
$subtot = number_format($subanswer,2);

$invtotal = number_format($totala,2);

echo "<table width=833 height=22 cellpadding=0 cellspacing=0>
  <tr bgcolor=#FFFFFF>
    <td width=325><span class=style15>$items</span></td>
    <td width=122><div align=center class=style15>$prices</div></td>
    <td width=107><div align=center class=style15>$quant</div></td>
    <td width=139><div align=center class=style15>$vat</div></td>
    <td width=122><div align=right class=style15>$subtot</div></td>
    <td width=16><div align=right><span class=style15></span></div></td>
  </tr>
</table>";

$numrows = $numrows - 1;

}

//INSERT BLANK LINES
while($numrows != 0)
{
	echo "<br>";
	$numrows = $numrows - 1;
}

?>
vibhaJ 126 Master Poster

As a fresher you will be confuse what to read and from where?
As a starter you can learn below points from Google.
- Refer basic functions like echo, print, exit, die, mail, implode, explode, count.
echo and exit will be useful for debug your output.
- How to submit form in php.
After form submission handle different input fields like check box, radio button, file, text box.
Contact us form is best example.
- Basic string and array operation.check php.net you can find example below function description.
During project coding you need repeatedly string and array usage.
- Now take a database like mysql. Starting from mysql_connect take a look for basic mysql function.
Make a demo page for listing data, add new data, edit data and delete data.
After this much basic info you can play with php.
Whenever you stuck anywhere there is always php.net and Google 'How To' available for you.

All the best..

karthik_ppts commented: useful +4
vibhaJ 126 Master Poster

Didn't get your logic.
You are searching from id and want id of searched field ??

vibhaJ 126 Master Poster

Mark thread solved.

vibhaJ 126 Master Poster

Check this.

<?
	echo $strDate = substr('Wed Jun 15 2011 00:00:00 GMT 0530',4,11);
	echo '<br />'.date('m/d/Y', strtotime($strDate));
?>
pbcomput commented: Thanks for your help. it solved my problem. +3
vibhaJ 126 Master Poster

Why you want type casting?
I mean if want to insert posted data in database you can directly insert it without casting.

vibhaJ 126 Master Poster

Because you haven't provided header after your logic.
Lets your page name is 'page.php'.

<?
	if(condition)
	{
		// your 
		// message
		// sending
		// code
		header("location:page.php");
		exit;
	}
?>
vibhaJ 126 Master Poster

You have changed old database credentials to new.
Check your new database's credentials proper.I think it should not be username:root for host:localhost.
Something went wrong with credentials only.

vibhaJ 126 Master Poster

if(isset($_GET) && !empty($_GET)){
$where = "";
if($_POST!="") {
$s[] = "`process` = '" . mysql_real_escape_string($_POST) . "'";
}

if($_POST!="") {
$s[] = "`process` = '" . mysql_real_escape_string($_POST) . "'";
}

if($_POST!="") {
$s[] = "`process` = '" . mysql_real_escape_string($_POST) . "'";
}

if($_POST!="") {
$s[] = "`process` = '" . mysql_real_escape_string($_POST) . "'";
}

if($_POST!="") { $s[] = "`age` >= " . intval($_POST);
}

if($_POST!="") { $s[] = "`age` >= " . intval($_POST);
}

if(isset($s)){
$where = "WHERE " . implode(" AND ",$s);

}
$query_str = "SELECT * FROM resumevault WHERE age BETWEEN '$age_one' AND '$age_two' AND position='$search_position' AND city='$search_city' AND process='$search_remarks' AND industry='$search_industry'";
}


I do it this way...theres no error but the process doesn't work,

actually i wrote something wrong with my 1st statement, my program code is working in the first way i did.. my target is to filter either filling up all fields or even one field.

As per ardav's logic you don't have to again write where condition. All above if-else condition itself makes where string. so your $query_str will be :

<? 
if(isset($s)){
$where = "WHERE " . implode(" AND ",$s);

}
$query_str = "SELECT * FROM resumevault WHERE ".$where;
}
?>
vibhaJ 126 Master Poster

There is one extra brace before break.

echo '<meta http-equiv="refresh" content="0;URL=yazi.php?id='.$id.'">';
	}
[B]}[/B]
break;
}
?>
vibhaJ 126 Master Poster

For adding data in mysql:
html_entities(mysql_real_escape_string($variable));

For echoing:
html_entity_decode(stripslashes($variable));

geoamins2 commented: very easy way to store special characters in mysql using php +1
vibhaJ 126 Master Poster

Use array in field name.
When form is submitted using foreach delete each element.

<?php
if(isset($_POST['delete']))
{
	$checkboxAll = $_POST['checkbox'];
	foreach( $checkboxAll as $key=>$del_id )
	{
		$sql = "DELETE FROM Inq_cat WHERE Inq_id='$del_id'";
		$result = mysql_query($sql);
	}
	header("location:index.php");
	exit;
}
?> 
<form name="frm" id="frm" method="post">
<input name="checkbox[]" type="checkbox" value="1" /> Cat name 1
<input name="checkbox[]" type="checkbox" value="2" /> Cat name 2
<input name="checkbox[]" type="checkbox" value="3" /> Cat name 3
<input name="delete" value="delete" type="submit" />
</form>
vibhaJ 126 Master Poster

Below is normalization. Field names are self explainable.
Also as urtvi suggested check event uniqueness.

====================
Table Name : event 
====================
eventId  eventTitle date
1        Seminar
2        Robotics
3        AI

====================
Table Name : user
====================
userId  fullName  email
1       John      user1@test.com
2       Tanya     user2@test.com
3       Mathew    user3@test.com

===============================
Table Name : event_participant
===============================
participantId eventId userId
1             1       2
2             1       3
3             2       3
4             2       2
5             2       1
vibhaJ 126 Master Poster

Find my inline comments.
Your logic and loop was messy and i didn't get it.
So i have recreated code.
For any php function help visit http://php.net/

<?
	$first="rahul";
	$second="shiva";
	echo "<h2>$first & $second</h2>";
   	$len= strlen($first) + strlen($second); // total no of letter in both words
 	
	// in this for loop we will check for matching  letters
	for($i=0;$i<strlen($first);$i++){
		for($j=0;$j<strlen($second);$j++){
			if($first[$i]==$second[$j])
			{
				echo '<br />Letter common : '.$first[$i];
				$len=$len-2; // two letters found common so 2 letters removed from total count
			}
		}
	}	
	$frd = explode(" ","F R I E N D S"); // created array for FRIENDS iteration
	echo '<br />Remaining Length : '.$len;
	echo '<br /><br />';
	$cnt = 0;
	while(count($frd)!=1) // untill we get only one element from FRIENDS do the loop
	{
		// this if-else loop will check the location which will be cut from FRIENDS
		if($len>count($frd))
		{
			$de = ($len % (count($frd)));
			if($de == 0)
				$de = count($frd);
			$l = $de -1;
		}
		else
			$l = $len-1;
		
		echo '<br />'.implode('',$frd).' Cross on '.$frd[$l];
		unset($frd[$l]); // removing crossed/cut element from FRIENDS array
		
		$frd = explode('#',implode('#',$frd));
		echo ', Remaining '.implode('',$frd);	
		$cnt++;		
	}
	echo '<h2>Answer is : '.implode('',$frd).'</h2>';
	
?>
vibhaJ 126 Master Poster

Once you know basics of AJAX, jquery provides a good way to use it.
http://api.jquery.com/jQuery.ajax/

vibhaJ 126 Master Poster

Your php shortag setting is closed.
Replace <? to <?php at first line.

vibhaJ 126 Master Poster

Can you create test.php and copy all my above code and run it in your browser.
And post whether your output is correct or not??

vibhaJ 126 Master Poster

This is because it is executing this way,
when first time it try to check pos 1 (from array value) ,increase it and make 2.
Second time it try to check pos 2 (from array value), NOW HERE from above first iteration you have also made pos 2. So here update will affect 2 row.
so on..
Solution is firstly you need to get all unique ID field for which you want to increase pos.
Then in update query use that unique id.
i.e. "UPDATE table1 SET position='$z'+1 Where id='$stored_id' ";

Green-z commented: Thanks for great support +0
vibhaJ 126 Master Poster

Have you tried this ????

Here i have made a script.
I think this is exactly what you want.
Try and give me feedback.

<?
	$first="rahul";
	$second="shiva";
	echo "<h2>$first & $second</h2>";
   	$len= strlen($first) + strlen($second);
 
	for($i=0;$i<strlen($first);$i++){
		for($j=0;$j<strlen($second);$j++){
			if($first[$i]==$second[$j])
			{
				echo '<br />Letter common : '.$first[$i];
				$len=$len-2;
			}
		}
	}	
	$frd = explode(" ","F R I E N D S");
	echo '<br />Remaining Length : '.$len;
	echo '<br /><br />';
	$cnt = 0;
	while(count($frd)!=1)
	{
		if($len>count($frd))
		{
			$de = ($len % (count($frd)));
			if($de == 0)
				$de = count($frd);
			$l = $de -1;
		}
		else
			$l = $len-1;
		
		echo '<br />'.implode('',$frd).' Cross on '.$frd[$l];
		unset($frd[$l]);
		
		$frd = explode('#',implode('#',$frd));
		echo ', Remaining '.implode('',$frd);	
		$cnt++;		
	}
	echo '<h2>Answer is : '.implode('',$frd).'</h2>';
	
?>
vibhaJ 126 Master Poster

Where is inactive_batch field?
Post complete code in CODE tags.

vibhaJ 126 Master Poster

Here i have made a script.
I think this is exactly what you want.
Try and give me feedback.

<?
	$first="rahul";
	$second="shiva";
	echo "<h2>$first & $second</h2>";
   	$len= strlen($first) + strlen($second);
 
	for($i=0;$i<strlen($first);$i++){
		for($j=0;$j<strlen($second);$j++){
			if($first[$i]==$second[$j])
			{
				echo '<br />Letter common : '.$first[$i];
				$len=$len-2;
			}
		}
	}	
	$frd = explode(" ","F R I E N D S");
	echo '<br />Remaining Length : '.$len;
	echo '<br /><br />';
	$cnt = 0;
	while(count($frd)!=1)
	{
		if($len>count($frd))
		{
			$de = ($len % (count($frd)));
			if($de == 0)
				$de = count($frd);
			$l = $de -1;
		}
		else
			$l = $len-1;
		
		echo '<br />'.implode('',$frd).' Cross on '.$frd[$l];
		unset($frd[$l]);
		
		$frd = explode('#',implode('#',$frd));
		echo ', Remaining '.implode('',$frd);	
		$cnt++;		
	}
	echo '<h2>Answer is : '.implode('',$frd).'</h2>';
	
?>
vibhaJ 126 Master Poster

Rahul this FRIENDS game we were doing in school :)

vibhaJ 126 Master Poster

Make sure your field type is INT.

vibhaJ 126 Master Poster

Use square bracket.

$keyarray[$i] = $tranrec[0];
vibhaJ 126 Master Poster

Oh i forget FROM.
Try this code and post output.

<?php
$q=$_GET['q'];

$con = mysql_connect('localhost', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("ajax_demo", $con)or die('cannot connect');

$q = preg_replace('/\s\s+/', ' ', $q); // remove extra spaces
$sql = "SELECT *,CONCAT(FirstName, ' ',LastName) as fullname FROM `ajax_demo_table` WHERE CONCAT(FirstName, ' ',LastName) LIKE  CONVERT(_utf8 '%".$q."%' USING latin1) COLLATE latin1_swedish_ci ";

$result = mysql_query($sql);//or die('cannot query '.$result);

echo "<table border='1'>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
<th>Hometown</th>
<th>Job</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['FirstName'] . "</td>";
  echo "<td>" . $row['LastName'] . "</td>";
  echo "<td>" . $row['Age'] . "</td>";
  echo "<td>" . $row['Hometown'] . "</td>";
  echo "<td>" . $row['Job'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?>
vibhaJ 126 Master Poster

No. Just add my code at line number 12 and remove your $sql query.

vibhaJ 126 Master Poster

Try this code.

$q = preg_replace('/\s\s+/', ' ', $q); // remove extra spaces
	$sql = "SELECT *,CONCAT(FirstName, ' ',LastName) as fullname WHERE CONCAT(FirstName, ' ',LastName) LIKE  CONVERT(_utf8 '%".$q."%' USING latin1) COLLATE latin1_swedish_ci ";
vibhaJ 126 Master Poster

Yeah i forget to replace that double quote to single.
Generally when you are using editor( i use dream weaver ) if string is not completed proper you can see color change.

vibhaJ 126 Master Poster

Formatted email

<?php


  $groupname = $_REQUEST['groupname'] ;
  $info = $_REQUEST['info'] ;
  $size = $_REQUEST['size'] ;
  $special = $_REQUEST['special'] ;
  $firstname =$_REQUEST['firstname'] ;
  $lastname = $_REQUEST['lastname'] ;
  $address1 = $_REQUEST['address1'] ;
  $address2 = $_REQUEST['address2'] ;
  $city = $_REQUEST['city'] ;
  $prov = $_REQUEST['prov'] ;
  $email = $_REQUEST['email'] ;
  $phone1 = $_REQUEST['phone1'] ;
  $phone2 = $_REQUEST['phone2'] ;
  $phone3 = $_REQUEST['phone3'] ;
  $website = $_REQUEST['website'] ;
  
$message = "<table width='600px' border="0" cellspacing='3' cellpadding='3'>
  <tr>
    <td><strong>Groupname :</strong></td>
    <td>$groupname</td>
  </tr>
  <tr>
    <td><strong>Info :</strong></td>
    <td>$info</td>
  </tr>
  <tr>
    <td><strong>Size :</strong></td>
    <td>$size</td>
  </tr>
  <tr>
    <td><strong>Special :</strong></td>
    <td>$special</td>
  </tr>
  <tr>
    <td><strong>Firstname :</strong></td>
    <td>$firstname</td>
  </tr>
  <tr>
    <td><strong>Lastname :</strong></td>
    <td>$lastname</td>
  </tr>
  <tr>
    <td><strong>Address1 :</strong></td>
    <td>$address1</td>
  </tr>
  <tr>
    <td><strong>Address2 :</strong></td>
    <td>$address2</td>
  </tr>
  <tr>
    <td><strong>City :</strong></td>
    <td>$city</td>
  </tr>
  <tr>
    <td><strong>Prov :</strong></td>
    <td>$prov</td>
  </tr>
  <tr>
    <td><strong>Email :</strong></td>
    <td>$email</td>
  </tr>
  <tr>
    <td><strong>Phone1 :</strong></td>
    <td>$phone1</td>
  </tr>
  <tr>
    <td><strong>Phone2 :</strong></td>
    <td>$phone2</td>
  </tr>
  <tr>
    <td><strong>Phone3 :</strong></td>
    <td>$phone3</td>
  </tr>
  <tr>
    <td><strong>Website :</strong></td>
    <td>$website</td>
  </tr>
</table>" ;
  $headers  = "From: ".$email."\r\n";
  $headers .= 'MIME-Version: 1.0' . "\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	
  mail( "user@mailserver.com", "Vendor Application",
    $message, $headers );
  header( "Location: http://www.thewebsiteimlinkingto.ca/thanks!.html" );
  
  
?>
vibhaJ 126 Master Poster

[By mistake]

vibhaJ 126 Master Poster
<?php 
	
		 
		require ("scripts/connect.php");
		 
		$dynamicList = "";
		$sql = mysql_query("SELECT * FROM products WHERE category = 'anyoccasion'");
		$productcount = mysql_num_rows($sql); // count the output amount
		if ($productcount > 0) 
		{
			$cnt = 0;
			$perRowProduct = 3;
			
			$dynamicList .= '<table width="100%" border="0" cellspacing="0" cellpadding="6">';
			while($row = mysql_fetch_array($sql))
			{ 
				$id = $row["id"];
				$productname = $row["productname"];
				$price = $row["price"];
				$dateadded = strftime("%b %d, %Y", strtotime($row["dateadded"]));
				
				if( $cnt==0 || $cnt % $perRowProduct==0 )
				{
					$dynamicList .= '<tr>';
				}
				$dynamicList .= '<td width="17%" valign="top"><a href="product.php?id=' . $id . '"><img style="border:#666 1px solid;" src="inventoryimages/' . $id . '.jpg" alt="' . $productname . '" width="77" height="102" border="1" /></a></td>
				<td width="83%" valign="top">' . $productname . '<br />
				£' . $price . '<br />
				<a href="product.php?id=' . $id . '">View Product Details</a></td>
				
				<td width="17%" valign="top"><a href="product.php?id=' . $id . '"><img style="border:#666 1px solid;" src="inventoryimages/' . $id . '.jpg" alt="' . $productname . '" width="77" height="102" border="1" /></a></td>
				<td width="83%" valign="top">' . $productname . '<br />
				£' . $price . '<br />
				<a href="product.php?id=' . $id . '">View Product Details</a></td>';
				
				if( ($cnt+1) % $perRowProduct==0 || ($cnt+1)==$productcount )
				{
					$dynamicList .= '</tr>';
				}
				$cnt++;	    
			}
			$dynamicList .= '</table>';
			
		} else {
			$dynamicList = "We have no Birthday Cards listed in our store yet";
		}
		mysql_close();
		
		?>
		
	<table >
	<tr>
	<td><?php echo $dynamicList; ?></td>
	</tr>
	</table>

$perRowProduct is total column per row.

vibhaJ 126 Master Poster

In both page array name ie $lang will be same?
You mean you can't modify template.php and newvalues.php's php code.
You want third php file which will take both file's array as an input.
What will be output? A string?
Sorry but one example of input and output will be more clear. :)

vibhaJ 126 Master Poster

Try this code and see what error you are getting.

<?
	echo $query= "SELECT * FROM table WHERE col1 LIKE '%$search_Recordset2%' OR col2 LIKE '%$search_Recordset2%' OR col3 LIKE '%$search_Recordset2%'";	
	$result = mysql_query($query);
	if (!$result) {
		die('Invalid query: ' . mysql_error());
	}

?>
vibhaJ 126 Master Poster

You just want to use the array values of newvalues.php to template.php.
I am not sure if i am correct or not.
Check below code.

<?
	include('newvalues.php');
	
	echo '<h2>New Values</h2>';
	echo '<pre>';
	print_r($lang);
	
	$langTemp = array(
	'this_key'  =>  'some other value',
	'something_else_key' => 'an old value',
	'another_key'  => 'spaghettiness');
	echo '<h2>Before replace</h2>';
	echo '<pre>';
	print_r($langTemp);
	
	foreach($langTemp as $key=>$val)
	{
		$langTemp[$key] = $lang[$key];
	}
	
	echo '<h2>After replace</h2>';
	echo '<pre>';
	print_r($langTemp);
?>
vibhaJ 126 Master Poster
vibhaJ 126 Master Poster

What happened??
Is this fixed???

vibhaJ 126 Master Poster
vibhaJ 126 Master Poster

Why you are setting so much session variables?
I think your logic is messy.

Try below code if it helps you.

<?  session_start();
	// list of username and password
	$users = array("user1" =>"3202", "user2" =>"2002", "user3" =>"1061", "user4"=>"1400", "user5"=>"1001");


if( isset($_POST['username']) && isset($_POST['password']) ) // form sibmitted with username and password
{ 
	foreach($users as $username=>$password)
	{
		if($username==$_POST['username'] && $password==$_POST['password']) // check username and password is vaalid or not
		{
			$_SESSION['username'] = $_POST['username'] ; // username is correct so set session 
			$_SESSION['password'] = $_POST['password'] ; // password is correct so set session 		
			
			header("Location: home.php ");
			exit;
		}
	}
	echo "Incorrect username and password.";	// no match found
	exit;
}

?>

YeeeEE.... 500 POSTS ON DANIWEB.. M HAPPY :)

vibhaJ 126 Master Poster

can i set time let say that for 3 second that loading text will visible after 3 second that request has to proceee.


thanx

I would suggest you to not limit it for static 3 sec.
Because sometimes based on server speed it may differs.
I had situation in past where sometimes it takes millisecond or some times if ajax page is taking time then it may take some more seconds.
So better to not take fix 3 SECONDS.

vibhaJ 126 Master Poster

I prefer below steps:
1. create div for loading text or image.
2. With binding ajaxStart event we can show loading div.
3. With binding ajaxStop event we can hide loading div.
4. This way in you page whenever ajax ia called loading div will automatically shown.

Below is code for that..

<!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>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
</head>

<body>
<!-- ################# Ajax Loading start ################# -->
<script language="javascript">
$(document).bind('ajaxStart', function() {
  $('#ajaxLoading').show();
});
$(document).bind('ajaxStop', function() {
  $('#ajaxLoading').hide();
});
</script>
<div id="ajaxLoading" style="background-color:#777777;position:fixed;height:100%;width:100%;left:0px;top:0px;opacity:0.7;filter:alpha(opacity=70); display:none;"><div style="position:absolute;top:30%;left:45%;">Loading....</div>
</div>
<!-- ################# Ajax Loading end ################# -->


<script language="javascript">
$(document).ready(function () {
$('#form').submit(function() {
						   
  $.ajax({
    type: 'get',
    url: 'search_hotel.php',
    data:  $('#'+this.id).serialize(),
	dataType: "html",
	async:false,
    success: function(result){
      $('#dsr').html(result);
    }    
  });  
  return false;
});
});
</script>
<form id="form" name="form" method="post">
Name : <input name="" type="text" />
<input name="submit" value="submit" type="submit" />
</form>
</body>
</html>
vibhaJ 126 Master Poster

Correction...

$information = mysql_query("SELECT * FROM table WHERE informationtype='message' OR informationtype='email'");
vibhaJ 126 Master Poster

Thanks pritaeas for info.