Hi folks,
I want to design a web page as in the attachment webpage.png where I have some welcome text,a marquee text, table displaying the mysql database contents,table containing text boxes(its third row of the table mentioned in the .png file) to edit text and finally three buttons edit, delete and logout.
I tried some script for that:
Code:
.....
sub delete()
{
$sth=$dbh->prepare("delete * from Employee where Last_Name=? and Age=?")||die "unable to prepare\n";
$sth->execute($name,$age)||die "unable to execute\n";
print "Deleted Successfully "+$sth->rows()+" !";
$sth->finish();
}
.....
sub edit()
{
$sth=$dbh->prepare("update Employee set First_Name=?,Last_Name=?,Age=?,Designation=?,Salary=? where Last_Name=? and Age=?")||die "unable to prepare\n";
#$sth->execute(document.values.txtfirst.value,document.values.txtlast.value,document.values.txtage.value,document.values.txtdesg.value,document.values.txtsal.value,$name,$age)|die "unable to execute\n";
print "Updated Successfully "+$sth->rows()+" !";
$sth->finish();
}
.....
<input type='button' name='delete' value='delete' onClick='delete()'/>
.....
<input type='button' name='edit' value='edit' onClick='edit()'\>
.....
But I'm unable to achieve the functionality.
Also the table containing only text boxes(mentioned above) should be visible only when I click on the edit button.
And I was unable to make an image as a page background. Actually where to keep that image and how to call it using <body background='the path'>)
How can I achieve this using perl CGI?
Please assist me.
Thanks in advance....