ksumanth
-
Posts
34 -
Joined
-
Last visited
Posts posted by ksumanth
-
-
can you provide me any example regarding status
-
Hello Everyone,
admin:
I created one login form using sessions. In that login form i given some conditions
1. If status is inactive, username and password not match it is not going to inside page(inside.php).
administrator
2.At the same i create administrator panel and i given two options for status
1.Active
2.InActive
3.Suppose i login in admin panel (username, password, status is active ).i am in inside.php.
Now i am going to administrator panel and just change the status of userlogin "Inactive"
If i refresh "inside.php" it should come to login page
can any one have an idea how to make
-
In my hosting cpanel where to check
-
Hi EveryOne
I have the script below to upload and unzip files on my website. The problem is that i can only get it ti work on small files that about 2 MB in size. When I try to upload a file that is 10 MB, the progress successfully runs to 100%, then the page refreshes, and i am back at the upload page with NO error message and nothing is uploaded.
<?php if($_FILES["zip_file"]["name"]) { $filename = $_FILES["zip_file"]["name"]; $source = $_FILES["zip_file"]["tmp_name"]; $type = $_FILES["zip_file"]["type"]; $name = explode(".", $filename); $accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed'); foreach($accepted_types as $mime_type) { if($mime_type == $type) { $okay = true; break; } } $continue = strtolower($name[1]) == 'zip' ? true : false; if(!$continue) { $message = "The file you are trying to upload is not a .zip file. Please try again."; } $target_path = "/home1/cleaverc/public_html/temporary/".$filename; if(move_uploaded_file($source, $target_path)) { $zip = new ZipArchive(); $x = $zip->open($target_path); if ($x === true) { $zip->extractTo("/home1/cleaverc/public_html/temporary/"); $zip->close(); unlink($target_path); } $message = "Your .zip file was uploaded and unpacked."; } else { $message = "There was a problem with the upload. Please try again."; } } ?> <!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> <?php if($message) echo "<p>$message</p>"; ?> <form enctype="multipart/form-data" method="post" action=""> <label>Choose a zip file to upload: <input type="file" name="zip_file" /></label> <br /> <input type="submit" name="submit" value="Upload" /> </form> </body> </html>
What am I doing wrong? What needs to be changed? -
Thanks i got this
-
Hello everyone,
I have a form, In that i have two textboxes
1. Total amount
2. Paid amount
if second textbox value is greater than first textbox then i should display alert and the textbox should empty using javascript or jquery.
can any one help me
Thanks
Sumanth
-
Hello everyone,
I have a form and filling all the details. Once form is filled , while click on submit button i just display alert "Please check your all information one more time" like this
can any one know how to do this
Thanks
sumanth
-
Thank you i got this
-
Thank You I got this but even i have one more option called radiobutton and if i click radiobutton it is accepting only first value. I mean value display in textbox and totalsum calculation is taking default value here is my code can you fix this
<html> <head> <script type="text/javascript"> function updateTotal() { var date0 = document.getElementById('date0'); var date1 = document.getElementById('date1'); var date2 = document.getElementById('date2'); var amount = 0; amount += date0.checked ? parseFloat(date0.getAttribute('data-price')) : 0; amount += date1.checked ? parseFloat(date1.getAttribute('data-price')) : 0; amount += date2.checked ? parseFloat(date2.getAttribute('data-price')) : 0; var totalpages = parseInt(document.getElementById('totalpages').value); var packages = parseInt(document.getElementById('packages').value); document.getElementById('total').value = amount; document.getElementById('pagesprice').value = totalpages; document.getElementById('packagecost').value = packages; document.getElementById('totalprice').value = amount + totalpages + packages; } </script> </head> <body> <table> <tr> <td id="datecontainer" onchange="Process(this.options[this.selectedIndex].value)"> <input id="date0" type="checkbox" name="form[date]" value="blue" data-price="10" onChange="updateTotal();" />product 1(10)<br /> <input id="date1" type="checkbox" name="form[date]" value="green" data-price="30" onChange="updateTotal();" />product 2(30)<br /> <input id="date2" type="checkbox" name="form[date]" value="red" data-price="50" onChange="updateTotal();" />product 3(50)<br /> </td> <tr> <td> Total cost Product: <input name="total" id="total" type="text" readonly="readonly" /> </td> </tr> <tr> <td> Pages Price <select id="totalpages" style="width:205px" onchange="updateTotal()"> <option value="0">Select Pages</option> <option value="5">5 Pages</option> <option value="10">10 Pages</option> <option value="15">15 Pages</option> <option value="25">25 Pages</option> <option value="30">30 Pages</option> <option value="100">More than 35 Pages</option> </select> </td> </tr> <tr> <td> Total cost Pages: <input name="pagesprice" id="pagesprice" type="text" readonly="readonly" /> </td> </tr> <tr> <td>Package <input type="radio" name="packages" id="packages" value="100" onclick="updateTotal();" />50MB <input type="radio" name="packages" id="packages" value="200" onclick="updateTotal();" />100MB <input type="radio" name="packages" id="packages" value="300" onclick="updateTotal();" />200MB </td> </tr> <tr> <td> Total Package Cost: <input name="packagecost" id="packagecost" type="text" readonly="readonly" /> </td> </tr> <tr> <td> Total Pagesprice+Total cost Product+Total Package Cost <input name="totalprice" id="totalprice" type="text" readonly="readonly" /> </td> </tr> </table> </body> </html>
-
Hello Everyone,
I created a form and in that i have "Multiple Checkboxes" and "Dropdown list ". If i click check boxes the value should add "Indual textbox+Total Textbox".
2. I have one more option select No of pages if i select dropdown No of pages , It should display "Indual textboxprice+Checkboxselectprice".
I did all the calculations but the total value is displaying NAN if i click on checkboxes
Here is my code can any one fix this
<html>
<head>
<script type="text/javascript">
function updateTotal(){
var date0 = document.getElementById('date0');
var date1 = document.getElementById('date1');
var date2 = document.getElementById('date2');
var amount = 0;
amount += date0.checked ? parseFloat(date0.getAttribute('data-price')) : 0;
amount += date1.checked ? parseFloat(date1.getAttribute('data-price')) : 0;
amount += date2.checked ? parseFloat(date2.getAttribute('data-price')) : 0;
document.getElementById('total').value = amount;
var pagesprice=document.getElementById('totalpages').value;
document.getElementById('pagesprice').value=pagesprice;
var domainprice=document.getElementById('totalprice');
domainprice.value =amount+parseFloat(pagesprice);
}
</script>
</head>
<body>
<table>
<tr>
<td id="datecontainer" onchange="Process(this.options[this.selectedIndex].value)">
<input id="date0" type="checkbox" name="form[date]" value="blue" data-price="10" onChange="updateTotal();">product 1(10)<br />
<input id="date1" type="checkbox" name="form[date]" value="green" data-price="30" onChange="updateTotal();">product 2(30)<br />
<input id="date2" type="checkbox" name="form[date]" value="red" data-price="50" onChange="updateTotal();">product 3(50)<br />
</td>
<tr><td>Total cost Product:
<input name="total" id="total" type="text">
</td></tr>
<tr><td>Pages Price
<select id="totalpages" style="width:205px" onchange="updateTotal()">
<option value="">Select Pages</option>
<option value="5">5 Pages</option>
<option value="10">10 Pages</option>
<option value="15">15 Pages</option>
<option value="25">25 Pages</option>
<option value="30">30 Pages</option>
<option value="100">More than 35 Pages</option>
</select>
</td></tr>
<tr><td>Total cost Pages:
<input name="pagesprice" id="pagesprice" type="text">
</td></tr>
<tr><td>Total Pagesprice+Total cost Product
<input name="totalprice" id="totalprice" type="text">
</td></tr>
</table>
</body>
</html> -
Hello Everyone,
I created a form and in that i have "Multiple Checkboxes" and "Dropdown list ". If i click check boxes the value should add "Indual textbox+Total Textbox".
2. I have one more option select No of pages if i select dropdown No of pages , It should display "Indual textboxprice+Checkboxselectprice".
I did all the calculations but the total value is displaying NAN if i click on checkboxes
Here is my code can any one fix this
<html>
<head>
<script type="text/javascript">
function updateTotal(){
var date0 = document.getElementById('date0');
var date1 = document.getElementById('date1');
var date2 = document.getElementById('date2');
var amount = 0;
amount += date0.checked ? parseFloat(date0.getAttribute('data-price')) : 0;
amount += date1.checked ? parseFloat(date1.getAttribute('data-price')) : 0;
amount += date2.checked ? parseFloat(date2.getAttribute('data-price')) : 0;
document.getElementById('total').value = amount;
var pagesprice=document.getElementById('totalpages').value;
document.getElementById('pagesprice').value=pagesprice;
var domainprice=document.getElementById('totalprice');
domainprice.value =amount+parseInt(pagesprice);
}
</script>
</head>
<body>
<table>
<tr>
<td id="datecontainer" onchange="Process(this.options[this.selectedIndex].value)">
<input id="date0" type="checkbox" name="form[date]" value="blue" data-price="10" onChange="updateTotal();">product 1(10)<br />
<input id="date1" type="checkbox" name="form[date]" value="green" data-price="30" onChange="updateTotal();">product 2(30)<br />
<input id="date2" type="checkbox" name="form[date]" value="red" data-price="50" onChange="updateTotal();">product 3(50)<br />
</td>
<tr><td>Total cost Product:
<input name="total" id="total" type="text">
</td></tr>
<tr><td>Pages Price
<select id="totalpages" style="width:205px" onchange="updateTotal()">
<option value="">Select Pages</option>
<option value="5">5 Pages</option>
<option value="10">10 Pages</option>
<option value="15">15 Pages</option>
<option value="25">25 Pages</option>
<option value="30">30 Pages</option>
<option value="100">More than 35 Pages</option>
</select>
</td></tr>
<tr><td>Total cost Pages:
<input name="pagesprice" id="pagesprice" type="text">
</td></tr>
<tr><td>Total Pagesprice+Total cost Product
<input name="totalprice" id="totalprice" type="text">
</td></tr>
</table>
</body>
</html> -
Hello everyone,
I created one form in that i created some checkboxes like price1,price2,price3.
And one Textbox for displaying value using javascript (or) Jquery (or) Ajax
Now my problem is if i checked price1, the price1 value should display in Texbox.
And if i checked two Checkboxes(price1,price2) the both values should add and display in textbox.
Can anyone help me out.
Thanks
sumanth
-
Hi i given flag and it is working fine. While click on suspend entire row i just want to disable can you have an idea.
-
Thanks i got this
-
Hello everyone,
In Admin, I created one form for employee details and save into the database.
Here i create options to view the table fields (Edit,Active/Inactive,Permentsuspend)
Here everthing is working fine . I need to Suspend the Employee details permentaly i mean one record from database.
Normally i just go for delete but i need to suspend the employee details permentaly and view any time i can view that details
Any sugessions
Thanks
Sumanth
-
Thanks for the Reply i got this
-
hello friends,
I have one paragraph , in that middle of the paragraph i just give "."(fullstop). If "." comes the sentence have to end.
I know how to give the limitation of the words in paragraph but i want to know If "." comes then the sentence should end .
can any one help me out.
Thanks sumanth.
-
Hello guys,
I created one form called Events in that 9 fields there like Id, Title, Eventdesc, video1,video2,video3,video4,video5,video6.
This is storing in database and while fetching data from database to frontend. i need to display all the videos video1,video2,video3,video4,video5,video6 for the particular event.
For that i need to fetch all the columns for particular row can any suggest me
Regards,
Sumanth
-
Hello friends,
I have a form that contains 3fields
1.Title
2.description
3.Image
The problem is while editing(UpdatingImage)
While submitting the form i written two queries in updateprocess.php
updateprocess.php
if(isset($_POST['submit']))
{
if($image == "")
{
$query1 = "update tblnews_details set heading='$tbl_heading',description='$description' where news_id='$frm_id'";
?>
<script language="javascript">
location.href = "ViewApproveNews.php";
</script>
<?
}
}
?>
-
Hello friends,
I created one form for news.The fields are
News_id, Title, Description, Image_path(For imageupload). Now it is inserting fine and i stored in database.
While Editing how could i fetch the image_path(from database) and pass to updateprocess.php and have to update.
Thanks
Sumanth.K
-
sorry i am not getting
-
This is my form
<!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>
<form id="frm" name="frm" method="post" action="contactprocess.php">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td>Name</td>
<td><input name="name" placeholder="Enter Name" type=text required value=""></td>
</tr>
<tr>
<td>Email Id</td>
<td><input name="email" placeholder="Enter Email" type=text required value=""></td></tr>
<tr>
<td>Subject</td>
<td><input name="subject" placeholder="Enter Subject" type=text required value=""></td> </tr>
<tr>
<td>Message</td>
<td><textarea name="Message" placeholder="Enter Message" required class="itextarea"></textarea></td>
</tr>
<tr>
<td>
<input type="checkbox" name="sendcopy" value="Yes" /> Send One Copy to my mail </td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="submit" id="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</td>
</tr>
</table>
</form>
</body>
</html>
This is process page
<?
echo $name=$_POST['name'];
echo $email=$_POST['email'];
echo $subject=$_POST['subject'];
echo $message=$_POST['Message'];
?>
<?php
if(isset($_POST['submit']))
{
function send_email ($to_email, $from_email, $from_name, $subject, $msg) {
//split up to email array, if given
if (is_array($to_email)) {
$to_email_string = implode(', ', $to_email);
}
else {
$to_email_string = $to_email;
}
//Assemble headers
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from_name <$from_email>" . "\r\n";
//send via PHP's mail() function
$mailsent=mail($to_email_string, $subject, $msg, $headers);
if($mailsent)
{
echo "<script>alert('Mail sent')</script>";
?>
<script>
window.location = 'index.php';
</script>
<?
}
else
{
echo "<script>alert('Not sent')</script>";
}
}
//$address=$_POST['address'];
$from = $name;
$subject = 'Enquiry Form ';
$message ="<html> <body >
<p><label>Contact Details</label></p>
<p><label><b>Name:</b></label>$name</p>
<p><label><b>Email:</b></label>$email</p>
<p><label><b>Your Questions:</b></label><br/>
$message
</p></body></html>";
send_email("sum@gmail.com",$email , " Enquiry", $subject, $message);
}
?>
This is normal sending mail i need while i click check box it should send one copy to sum@gmail.com and one copy to from_mail(who is sending enquiry form)
Thanks
Sumanth
-
Hello friends,
I have an enquiry form to send an email. In that i used one option checkbox. Normally while sending mail it sending. If check box is checked i need to send one to copy to particular sending mail id and fixed mail id here is my code.
Can any one fix this,
<form id="frm" class="iformlog" name="frm" method="post" action="contactprocess.php">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td>
<li style="height:20px;margin-bottom:10px;">
<label for="Last Name" style="margin-left:-10px;font-size:13px;">
Name<span style="color:#FF0000;">*</span></label>
<input class="itext" name="name" placeholder="Enter Name" type=text required onchange="isAlphabet(this)" style="margin-top:10px;margin-left:30px;" value=""></li>
<li style="height:20px;">
<label for="Last Name" style="margin-left:-10px;font-size:13px;">
Email Id<span style="color:#FF0000;">*</span></label>
<input class="itext" name="email" placeholder="Enter Email" type=text required style=""
onchange="echecko(this)" value=""></li>
<li style="height:20px;">
<label for="Last Name" style="margin-left:-10px;font-size:13px;">
Subject<span style="color:#FF0000;">*</span></label>
<input class="itext" name="subject" placeholder="Enter Subject" type=text required style=""
onchange="echecko(this)" value=""></li>
<div style="border:1p solid black;font-family:Tahoma,Arial,Sans-serif;font-size:14px; width:auto; height:auto;margin-left:-5px;">Message <span style="color:#FF0000;">*</span></div>
<li style="border:width:200px;margin-left:80px;margin-top:-28px;">
<textarea name="Message" placeholder="Enter Message" required class="itextarea"></textarea></li>
</td>
</tr>
<tr>
<td align="right">
<input type="checkbox" name="sendcopy" value="Yes" /> Send One Copy to my mail </td>
</tr>
<tr>
<td colspan="2">
<li style="height:20px;margin-left:100px;">
<input class="ibutton" type="submit" name="submit" id="submit" value="Submit" />
<input class="ibutton" type="reset" name="reset" value="Reset" />
</li>
</td></tr>
</td>
</tr>
</table>
</form>
Here process page code
<?
echo $name=$_POST['name'];
echo $email=$_POST['email'];
echo $subject=$_POST['subject'];
echo $message=$_POST['Message'];
?>
<?php
if(isset($_POST['submit']))
{
function send_email ($to_email, $from_email, $from_name, $subject, $msg) {
//split up to email array, if given
if (is_array($to_email)) {
$to_email_string = implode(', ', $to_email);
}
else {
$to_email_string = $to_email;
}
//Assemble headers
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from_name <$from_email>" . "\r\n";
//send via PHP's mail() function
$mailsent=mail($to_email_string, $subject, $msg, $headers);
if($mailsent)
{
echo "<script>alert('Mail sent')</script>";
?>
<script>
window.location = 'index.php';
</script>
<?
}
else
{
echo "<script>alert('Not sent')</script>";
}
}
//$address=$_POST['address'];
$from = $name;
$subject = 'Enquiry Form ';
$message ="<html> <body >
<p><label>Contact Details</label></p>
<p><label><b>Name:</b></label>$name</p>
<p><label><b>Email:</b></label>$email</p>
<p><label><b>Your Questions:</b></label><br/>
$message
</p></body></html>";
send_email("sumdummy@gmail.com",$email , "ADC Enquiry", $subject, $message);
?>
<?
if(isset($_POST["sendcopy"]) && $_POST["sendcopy"]=="Yes")
{
echo $name=$_POST['name'];
echo $email=$_POST['email'];
echo $subject=$_POST['subject'];
echo $message=$_POST['Message'];
function send_email ($to_email, $from_email, $from_name, $subject, $msg) {
//split up to email array, if given
if (is_array($to_email)) {
$to_email_string = implode(', ', $to_email);
}
else {
$to_email_string = $to_email;
}
//Assemble headers
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from_name <$from_email>" . "\r\n";
//send via PHP's mail() function
$mailsent=mail($to_email_string, $subject, $msg, $headers);
if($mailsent)
{
echo "<script>alert('Mail sent')</script>";
?>
<script>
window.location = 'index.php';
</script>
<?
}
else
{
echo "<script>alert('Not sent')</script>";
}
}
//$address=$_POST['address'];
$from = $name;
$subject = 'Enquiry Form ';
$message ="<html> <body >
<p><label>Contact Details</label></p>
<p><label><b>Name:</b></label>$name</p>
<p><label><b>Email:</b></label>$email</p>
<p><label><b>Your Questions:</b></label><br/>
$message
</p></body></html>";
send_email("sumdummy@gmail.com",$email,$email, "ADC puppy", $subject, $message);
}
}
?>
-
i am new to php i need snipet , that mulitple images stored in database
jquery validations for form
in Javascript Help
Posted
Hello Everyone,
I am quite new to jquery. I have a form and i need to validate characters,number,mobileno using jquery
(without using regular expression). i dont have any idea of this can any one have links or plugins, kindly provide me
Thanks
sumanth