For that we can use a module as follows.
use CGI::Carp qw(fatalsToBrowser);
Search cpan.org for more details.
For that we can use a module as follows.
use CGI::Carp qw(fatalsToBrowser);
Search cpan.org for more details.
#!/usr/bin/perl -w
use strict;
use CGI;
use vars qw($q);
use CGI::Carp qw(fatalsToBrowser);
use Mail::Sendmail;
use Mail::Sender;
$q = new CGI;
print $q->header();
my $mail_content=qq{
<html>
<head>
<title>Registration</title>
</head>
<body>
<p>
Test Content </p>
</body>
</html>
};
my $subject=”Subject”;
my %mail = (
To => “test_to\@manu.co.in”,
From=>Â “test_from\@manu.co.in”,
subject=> $subject,
);
$mail{‘content-type’} = “text/html”;
$mail{Smtp} = “localhost”;
$mail{‘Message : ‘} = $mail_content ;
if (sendmail %mail){
print qq{
<script type=”text/javascript”>
alert(“Registration success”);
</script>
};
}
else{
print qq{
<script type=”text/javascript”>
alert(“Registration failed. Please Try Again”);
</script>
};
}
SELECT bookings_category.id AS id,bookings_category.desc_en AS room,COUNT(*) AS cnt FROM bookings_items,bookings_category WHERE bookings_category.id=bookings_items.category AND bookings_category.state=’1′ AND bookings_items.state=’1′ GROUP BY bookings_items.category;
o/p
Actual tables
bookings_category
bookings_items
UPDATE table SET `status`= CASE WHEN (id=”4″) THEN “1” ELSE “0” END;
o/p
SELECT CONVERT_TZ(FROM_UNIXTIME(1380011215),’+05:30′,’+00:00′);
o/p
2013-09-24 08:26:55
You must be logged in to post a comment.