Shanti C 106 Posting Virtuoso

i have get you with my code....
its working...

Shanti C 106 Posting Virtuoso

please provide your database table....

Shanti C 106 Posting Virtuoso

first try in mysql with delete opration like:

DELETE FROM autoalto_mail where mail_id=25

use the mail_id which is in your table....

if its work ,then notify me...

Shanti C 106 Posting Virtuoso

you didn't mention any id to delete :

<a href="contractor_mail_delete_action.php"><b>Delete</b></a>

and print this: echo $_GET; in your contractor_mail_delete_action.php page .

Shanti C 106 Posting Virtuoso

make this thread as solved...

Shanti C 106 Posting Virtuoso

sunee..
plz go through this attachment...

Shanti C 106 Posting Virtuoso

you just copy and paste the examples from w3schools and any other and then run then in IE or firefox,then you will get the output...
and try to edit the code in which way you want...
read the materials about html and css...
www.w3schools.com is best for begginners...

Shanti C 106 Posting Virtuoso
SELECT * FROM table WHERE date_col<curdate() and date>DATE_ADD(CURDATE(), INTERVAL -1 DAY)
Shanti C 106 Posting Virtuoso

change your code to:

$result = mysql_query("SELECT * FROM  autoalto_mail where mail_id='".$_REQUEST['mail_id']."'" );
Shanti C 106 Posting Virtuoso

then check your database connections and table name and column names...
And put echo before your query and execute it
in your mysql...

or send your entire code with database....

Shanti C 106 Posting Virtuoso

You must write $_request as $_REQUEST..

so the code is:

$result = mysql_query("SELECT * FROM  autoalto_mail where mail_id='".$_REQUEST[$a]."'" );

The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE.

Shanti C 106 Posting Virtuoso

try in this way:

$result = mysql_query("SELECT * FROM  autoalto_mail where mail_id='".$_request[$a]."'" );
Shanti C 106 Posting Virtuoso

k praveen...tel me if any error occurs...

Shanti C 106 Posting Virtuoso

Try this..
it works fine:

<? 
mysql_connect('localhost','root','1234');
mysql_select_db('banjarahills');

if($_SERVER['REQUEST_METHOD']=='POST'){
print_r($_POST);

$n=$_POST['name'];
$m=$_POST['message'];
}
if(isset($_POST['submit']))
{
 $message=$_POST['message'];

   $name=$_POST['name'];
   
   

   

   if(strlen($message)<1)

   {

   print "You did not type amessage."; //no name entered

   }

   else if(strlen($name)<1)

   {

      print "You did not type name."; //no post entered

   }


  
  else

   {
      $thedate=date("U"); //get unix timestamp

      $displaytime=date("F j, Y, g:i a");

      //we now strip HTML injections
      $message=strip_tags($message);

      $name=strip_tags($name); 
	  
			 	
     $insertpost="INSERT INTO shout (message,name) values('$message','$name')";

      mysql_query($insertpost) or die("Could not insert post"); 
	  } }


 
$res="select * from shout";
$res1=mysql_query($res);

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<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>

<body>
<form action="" name="form1" method="post">
<table width="981" height="57" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="155"><a href="#" onClick="toggle_it('prl')">shoutbox</a></td>
    <td width="826">
	<marquee direction="left">
	<?
	if(isset($_POST['submit']))
{
while($res2=mysql_fetch_array($res1))
{
	?>
	<?=$res2['message'];?>:<?=$res2['name'];?><? }}?></marquee>
	</td>
 </tr>
<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>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="submit"></td>
  </tr>
 
  </table>
</table>
</form>
</body>
</html>
Shanti C 106 Posting Virtuoso

Try this..
it works fine:

<? 
mysql_connect('localhost','root','1234');
mysql_select_db('banjarahills');

if($_SERVER['REQUEST_METHOD']=='POST'){
print_r($_POST);

$n=$_POST['name'];
$m=$_POST['message'];
}
if(isset($_POST['submit']))
{
 $message=$_POST['message'];

   $name=$_POST['name'];
   
   

   

   if(strlen($message)<1)

   {

   print "You did not type amessage."; //no name entered

   }

   else if(strlen($name)<1)

   {

      print "You did not type name."; //no post entered

   }


  
  else

   {
      $thedate=date("U"); //get unix timestamp

      $displaytime=date("F j, Y, g:i a");

      //we now strip HTML injections
      $message=strip_tags($message);

      $name=strip_tags($name); 
	  
			 	
     $insertpost="INSERT INTO shout (message,name) values('$message','$name')";

      mysql_query($insertpost) or die("Could not insert post"); 
	  } }


 
$res="select * from shout";
$res1=mysql_query($res);

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<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>

<body>
<form action="" name="form1" method="post">
<table width="981" height="57" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="155"><a href="#" onClick="toggle_it('prl')">shoutbox</a></td>
    <td width="826">
	<marquee direction="left">
	<?
	if(isset($_POST['submit']))
{
while($res2=mysql_fetch_array($res1))
{
	?>
	<?=$res2['message'];?>:<?=$res2['name'];?><? }}?></marquee>
	</td>
 </tr>
<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>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="submit"></td>
  </tr>
 
  </table>
</table>
</form>
</body>
</html>
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

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

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

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

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

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

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

Shanti C 106 Posting Virtuoso

Your update query should be like this:

$qur= "update tbl_circular set `date`='".$date."', `headline`='".$headline."', `description`='".$des."' where headline like  '%".$head."%'";	
$update1=mysql_query($update) or die("Could not Update");

Post if error occures...

Shanti C 106 Posting Virtuoso

Hello..
i have posted another two ways which i have posted...
try to implement with those also...
then tel me where will be the error...

Shanti C 106 Posting Virtuoso

always mark thread as solved, when you get solution, as it will help others if they are searching for a solution.

Shanti C 106 Posting Virtuoso
if (Date.parse(fromDate) > Date.parse(toDate)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
return false;

}

or

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<meta name="Content-Style-Type" content="text/css">
<title>Example</title>

<script type="text/javascript">
<!--
function check (f) {
var start = new Date (f.start.value);
var end = new Date (f.end.value);

start.setDate (start.getDate() + 28);
if (end >= start) {alert (); return false}
}
// -->
</script>

<style type="text/css">
<!--
fieldset {padding:1ex; width:10em}
label {display:block; margin:1em 0}
input {display:block}
button {display:block; margin:auto}
-->
</style>

</head>
<body>
<form action="some-script.pl" onsubmit="return check (this)">
<fieldset>
<legend>Dates</legend>
<label>Start Date<input name="start" onchange="this.value = new Date (this.value).toDateString()" type="text"></label>
<label>End Date<input name="end" onchange="this.value = new Date (this.value).toDateString()" type="text"></label>
<button type="submit">Submit</button>
</fieldset>
</form>
</body>
</html>

or simply

function dt()
    {
        var ch=Date.parse("06/19/2008");
       
        var currentdt=new Date;
        if(ch>Date.parse(currentdt))
        {
            alert("Date is greater.");
        }
        else
        {
            alert("Date is less");
        }
    }
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

Fine...

And make this thread as solved...

Shanti C 106 Posting Virtuoso
if($_GET['stat']==1){$p=1;$m=5;}
else{$p=0;$m=6;}
$q="update yourtable set status='".$p."' where id='".$_GET['id']."' ";
mysql_query($q);

this is to display status:

if($row['status']==0)
			{
			$i="In-Active";
			$j=1;
			}
			else
			{
			$i="Active";
			$j=2;
			}

This is where your status link in your page:

<td  align="center"class="style13" ><a href="managepage.php?id=<?=$row['id']?>&stat=<? echo $j?>" > <? echo $i?></a> </td>
Shanti C 106 Posting Virtuoso

First you have contact with paypal payment gate way..
Then they will provide with some variables..
Then nothing to do:
We just send them(to paypal) with user card number and amount and some vars if required..
Then they will send back our request with info..
then you will indicate that info to your end user...
Simple..
but first you should contact the paypal payment gateway..
Thanks..

Shanti C 106 Posting Virtuoso

Use color formats are decent.
Make correct alignments.
Use your english professionally..
Make decent font in your css file.
I think this color is nice and professional:#6F6754.
Make your hyperlinks without line by using css.
Sure every page in your site is with same alignment.
Use good buttons with decent color.
Dont place too much images in your site.
Use medium size for your default font.
Set page properties to 0.
ALL THE BEST.

Shanti C 106 Posting Virtuoso

The Code above is not in the correct meaning:
Means:
The php script will execute first...
So if($_POST == "services") ,this line is selected by user,
so u will get this error:
Notice: Undefined variable: result in E:\web\forumsnetwork\frontend\saneg.php on line 7

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\web\forumsnetwork\frontend\saneg.php on line 7

Notice: Undefined index: category in E:\web\forumsnetwork\frontend\saneg.php on line 14
error
Notice: Undefined index: category in E:\web\forumsnetwork\frontend\saneg.php on line 28
error

So,first you have to decide what you are trying to do..
Tel me what is your task has to do..

Thanks.

Shanti C 106 Posting Virtuoso

I think you % symbol is giving you that error..

Shanti C 106 Posting Virtuoso

Yes,Nav's answer is damn right...
Better to provide many accounts from one computer...
And try sessions also,if you want to store more user data like nick name etc...
Thnks..

Shanti C 106 Posting Virtuoso

Check these attachments..
These are very usefull for you..

The dropdown works on both php and ajax..
Check out..
Thank
Shanti

Shanti C 106 Posting Virtuoso

Hello kavitha try this...

<?
/...database connections...
if(!empty($_GET['delid'])){  
	mysql_query("delete from category WHERE id='".$_GET['delid']."'");
	
	header("location:samepage.php?msg=del");
	
}
?>
//This is in your designing table...
 <td height="22" align="center" ><a href="javascript:del('<? echo $frow['id'];?>')">Delete</a> </td>
//and this can be anyware in your page

            <script language="javascript">
var d = document.frmmngmall;						
	function del(x)
	{
				
				if(confirm("You want to delete this record"))
					{
					d.action="samepage.php?delid="+x;
					d.submit();
					}
				
			return;
	}
        </script>
 

<? /...database connections... if(!empty($_GET['delid'])){ mysql_query("delete from category WHERE id='".$_GET['delid']."'"); if(!empty($_GET['start'])) { header("location:add_subcategory.php?msg=del&start=".$_GET['start'].""); }else{ header("location:samepage.php?msg=del"); } } ?> //This is in your designing table... <td height="22" align="center" ><a href="javascript<b></b>:del('<? echo $frow['id'];?>')">Delete</a> </td> //and this can be anyware in your page <script language="javascript"> var d = document.frmmngmall; function del(x) { if(confirm("You want to delete this record")) { d.action="samepage.php?delid="+x; d.submit(); } return; } </script>

And your a href must be in form tag...

This is working finely...try this...

Thanks.
Shanti

Shanti C 106 Posting Virtuoso

Hello kavitha try this...

<?
/...database connections...
if(!empty($_GET['delid'])){  
	mysql_query("delete from category WHERE id='".$_GET['delid']."'");
	if(!empty($_GET['start']))
    {
	header("location:add_subcategory.php?msg=del&start=".$_GET['start']."");
	}else{
	header("location:samepage.php?msg=del");
	}
}
?>
//This is in your designing table...
 <td height="22" align="center" ><a href="javascript:del('<? echo $frow['id'];?>')">Delete</a> </td>
//and this can be anyware in your page

            <script language="javascript">
var d = document.frmmngmall;						
	function del(x)
	{
				
				if(confirm("You want to delete this record"))
					{
					d.action="samepage.php?delid="+x;
					d.submit();
					}
				
			return;
	}
        </script>

And your a href must be in form tag...

This is working finely...try this...

Thanks.
Shanti