Jump to content

sandhya

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by sandhya

  1. Thanks for your code. It works with the images taken from the form. But i am taking the existed images from the database. How can i create thumb nails for those images?
  2. Hi all, I'm trying to create thumbnails of images from database. for this i'm using the following code.I used the same code some where else. It worked. But not here. What's the problem? Here is the code. <? $thumb_dir = "admin/gallery/thumbs/"; $filename = 'admin/gallery/'.$rowgal[gal_photo]; $filename1 = 'admin/gallery/thumbs/'.$rowgal[gal_photo]; $thumb_height = 150; // Content type header('(anti-spam-(anti-spam-content-type:)) image/jpeg'); // Get new sizes list($width, $height) = getimagesize($filename); $ratio = ($height/$width); $newheight = $thumb_height; $newwidth = round($thumb_height/$ratio); // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($filename); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output //imagejpeg($thumb, $thumb_dir, 100); imagejpeg($thumb, $filename1, 100); ?> I hope somebody can help me. Thanks in advance.
  3. The directory conatains joomla15 folder. And coming to httpd.conf file, how can i find about this is directing correctly or not? Actually I am new to Joomla. Please help me.
  4. Hi all, Already i"ve given the same topic before once. But i didn't get any responce. So, I am reposting this.Please help me. I am trying to install Joomla. After installing XAMPP i am trying to install Joomla. When http://localhost is opened it worked properly. When opened http://localhost/joomla15. I got error like this. Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost 05/02/09 17:19:59 Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0 What is the problem? Please help me?
  5. Hi is there any problem?
  6. <? ob_start(); session_start(); header("Cache-control: private"); include_once("include/include.php"); ?><html> <head> <title>WWW.akrjewellers.com...Your Cart</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> function mnat() { window.open('delview.php','nbt','height=400,width=500,left=200,top=100,status=no,menubar=no,resizable=0,scrollbars=yes'); } function manasan1(srt) { var mn=true; var q1=eval(document.form1.nrec.value); for(u=0;u<q1;u++) { mft=u*3; var utr=document.form1.elements[mft].value; if(trimString(utr)=="") { alert("Enter Quantity"); mn=false; document.form1.elements[mft].value=""; document.form1.elements[mft].focus(); break; } else if(numcheck(utr)==false) { alert("Invalid quantity Entered"); mn=false; document.form1.elements[mft].focus(); break; } else { continue; } } if(mn==true) { for(u=0;u<q1;u++) { mft=(u*3)+1; var utr=document.form1.elements[mft].value; if(trimString(utr).length>100) { alert("Message should be less than 100 characters"); mn=false; document.form1.elements[mft].focus(); break; } else { continue; } } } if(mn==true) { if(trimString(document.form1.spmess.value).length>150) { alert("Special message should be less than 150 characters"); mn=false; document.form1.spmess.focus(); } } if(mn==true) { document.form1.direct.value="continue"; document.form1.redirect.value=srt; document.form1.submit(); } } function manasan2(srt) { var mn=true; var q1=eval(document.form1.nrec.value); for(u=0;u<q1;u++) { mft=u*3; var utr=document.form1.elements[mft].value; if(trimString(utr)=="") { alert("Enter Quantity"); mn=false; document.form1.elements[mft].value=""; document.form1.elements[mft].focus(); break; } else if(numcheck(utr)==false) { alert("Invalid quantity Entered"); mn=false; document.form1.elements[mft].focus(); break; } else { continue; } } if(mn==true) { for(u=0;u<q1;u++) { mft=(u*3)+1; var utr=document.form1.elements[mft].value; if(trimString(utr).length>100) { alert("Message should be less than 100 characters"); mn=false; document.form1.elements[mft].focus(); break; } else { continue; } } } if(mn==true) { if(trimString(document.form1.spmess.value).length>150) { alert("Special message should be less than 150 characters"); mn=false; document.form1.spmess.focus(); } } if(mn==true) { document.form1.direct.value="checkout"; document.form1.redirect.value=srt; document.form1.submit(); } } function chk(form1) { var mn=true; var q1=eval(form1.nrec.value); for(u=0;u<q1;u++) { mft=u*3; var utr=form1.elements[mft].value; if(trimString(utr)=="") { alert("Enter Quantity"); mn=false; form1.elements[mft].value=""; form1.elements[mft].focus(); break; } else if(numcheck(utr)==false) { alert("Invalid quantity Entered"); mn=false; form1.elements[mft].focus(); break; } else { continue; } } if(mn==true) { for(u=0;u<q1;u++) { mft=(u*3)+1; var utr=form1.elements[mft].value; if(trimString(utr).length>100) { alert("Message should be less than 100 characters"); mn=false; form1.elements[mft].focus(); break; } else { continue; } } } if(mn==true) { if(trimString(document.form1.spmess.value).length>150) { alert("Special message should be less than 150 characters"); mn=false; document.form1.spmess.focus(); } } if(mn==true) { document.form1.direct.value="update"; return true; } else { return false; } } function numcheck(str) { var tr=true; var s=str.length; if(s==0) { return true; } else { for(i=0;i<s;i++) { if(str.charCodeAt(i)<48||str.charCodeAt(i)>57) { tr=false; break; } } if(tr==false) { return false; } else { return true; } } } function trimString (str) { while (str.charAt(0) == ' ') str = str.substring(1); while (str.charAt(str.length - 1) == ' ') str = str.substring(0, str.length - 1); return str; } </script> </head> <body> <? if(!empty($_GET['remove'])) { $sqlup=executeupdate("delete from temp_orderdetails where temp_id=" . $_GET['remove']); } if(!empty($_POST['direct'])) { $rty=(int) $_POST['nrec']; $mp=$_POST['nrec']-1; if($rty != 0) { for($j=0;$j<$rty;$j++) { $mnp='text'.$j; $mnp2='area'.$j; $mnp3='qid'.$j; $newmess=$_POST[$mnp2]; $mp1=$_POST[$mnp]; $ids=$_POST[$mnp3]; if ($mp1 != 0) { $sqlup=executework("select * from temp_orderdetails where order_id=" . $cid1 . " and temp_id=" .$ids); $countc=@mysql_num_rows($sqlup); if($countc >0) { $row1=@mysql_fetch_array($sqlup); $mes=""; $sqlup=executework("update temp_orderdetails set order_product_qty=".$mp1." , order_messageon='".$mes."' where order_id=" . $cid1 . " and temp_id=" . $ids); } } else { $sqlup=executeupdate("delete from temp_orderdetails where order_id=" . $cid1 . " and temp_id=" . $ids); } } } if($_POST['direct']=="checkout") { redirect("checkout.php"); } if($_POST['direct']=="continue") { redirect($_POST['redirect']); } session_register("spmess"); $spmess=$_POST['spmess']; } ?> <? if (session_is_registered("bakeuser")) { include_once("header2.php"); } else { include_once("header.php"); } $cid=""; $cqty=0; $cmess=""; $cweight=""; $cprice=""; $cflavour=""; $rpage=""; if($_POST['rpage']=="") { if (!empty($_GET['rpage'])) { $rpage=$_GET['rpage']; } } else { $rpage=$_POST['rpage']; } if(empty($_POST['id'])) { } else { $cid=(int)trim($_POST['pid']); $cqty=(int)trim($_POST['qty']); $sqla=executework("select product_priceinDS from product where product_id=" . $cid); $counta=@mysql_num_rows($sqla); if($counta>0) { $rowa=@mysql_fetch_array($sqla); $cpr=$rowa["product_priceinDS"]; } } if(empty($_GET['id'])) { } else { $cid=(int)trim($_GET['id']); $cqty=(int)trim($_GET['qty']); $sqla=executework("select product_priceinDS from product where product_id=" . $cid); $counta=@mysql_num_rows($sqla); if($counta>0) { $rowa=@mysql_fetch_array($sqla); $cpr=$rowa["product_priceinDS"]; } } if(!empty($_POST[id])) { $cid=$_POST['id']; $cqty=$_POST['qty']; $cpr=$_POST[total]; } if(!empty($_POST['messg'])) { $cmesst=trim($messg); } if(!empty($_POST['weight'])) { $cwt=trim($weight); } if(!empty($_POST['flavour'])) { $vflavour=trim($flavour); } if(!empty($_POST['price'])) { $cprice=trim($price); } if($cid != "") { if(!session_is_registered("cid")) { $sql = executework("select max(temp_id) from temp_orderdetails"); $row=@mysql_fetch_array($sql); if(is_null($row[0])) { $maxidte=1; } else { $maxidte=(int)$row[0]+1; } $sql = executework("select max(order_id) from temp_orderdetails"); $row=@mysql_fetch_array($sql); if(is_null($row[0])) { $maxid=1; } else { $maxid=(int)$row[0]+1; } session_register("cid1"); $cid1=$maxid; session_register("maxidt"); $maxidt=$maxidte; $sql2 = executeupdate("insert into temp_orderdetails(temp_id,order_id,order_product_id,order_product_weight,order_product_flavour,order_product_upriced,order_product_qty,order_messageon) values($maxidt,$cid1,$cid,'$cwt','$cflavour',$cpr,$cqty,'$cmess')"); } else { $sql = executework("select product_category from product where product_id=" . $cid); $row=@mysql_fetch_array($sql); if ($row["product_category"]=="free") { $sql = executework("select count(*) from temp_orderdetails where order_id=" . $cid1 . " and order_product_id in(select product_id from product where product_category='free')"); $count = @mysql_num_rows($sql); if($count > 0) { redirect("uncart.php"); } } $sql = executework("select * from temp_orderdetails where order_id=" . $cid1 . " and order_product_id=" . $cid . " and order_product_upriced=" . $cpr); $count = @mysql_num_rows($sql); if($count>0) { $row=@mysql_fetch_array($sql); $modqty=$row["order_product_qty"]+$cqty; $sql5 = executework("update temp_orderdetails set order_product_qty=".$modqty." where where order_id=" . $cid1 . " and order_product_id=" . $cid . " and order_product_upriced=" . $cpr); } else { $sql2 = executeupdate("insert into temp_orderdetails(temp_id,order_id,order_product_id,order_product_weight,order_product_flavour,order_product_upriced,order_product_qty,order_messageon) values($maxidt,$cid1,$cid,'$cwt','$cflavour',$cpr,$cqty,'$cmess')"); } } } ?> <form action="shoppingcart.php?rpage=<? echo $rpage ?>" method="post" name="form1" onSubmit="return chk(this)"> <div align="center"> <table width="98%" align="center" cellpadding="4" cellspacing="4" bgcolor="#FFFEFD"> <tr> <td colspan="7" align="center"> </td> </tr> <? if(!session_is_registered("cid1")) { ?> <tr> <td colspan="7" align="right"> </td> </tr> <tr> <td colspan="7" align="center"><strong><font size="2" face="Arial, Helvetica, sans-serif">No Items in Your Cart.</font></strong></td> </tr> <tr> <td colspan="7" align="center"> </td> </tr> <tr align="center"> <td colspan="7"><input type="button" name="Submit" value="Continue shopping" onClick="location.href='<? echo $rpage ?>'"></td> </tr> <? } else { $sql0 = executework("select * from temp_orderdetails where order_id=" . $cid1 . " order by temp_id"); $count2=@mysql_num_rows($sql0); $sno=1; $netamt=0; $cart=0; $row=@mysql_fetch_array($sql0); if($count2 >0) { ?> <tr bordercolor="#FF8929" bgcolor="#FFF8F2"> <td colspan="7" align="left" bgcolor="#EEF2F7"><font size="2" face="Arial, Helvetica, sans-serif"><strong>How to edit your cart?</strong></font><br> <li><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif">To change quantity, edit quantity of the relevant product and press 'Update Cart' button.</font></li> <li><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif">To remove a product from shopping cart change corresponding product quantity to zero and press 'Update Cart' button.</font></li> </td> </tr> <tr bgcolor="#FFCEA6"> <td width="9%" align="center" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">SL.No.</font></strong></td> <td width="18%" align="center" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">Model ID</font></strong></td> <td width="21%" align="center" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">Name</font></strong></td> <td width="20%" align="center" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">Unit Price ($)</font></strong></td> <td width="6%" align="center" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">Weight</font></strong></td> <td width="15%" align="center" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">Quantity</font></strong></td> <td width="17%" align="right" bgcolor="#B7C8D9"><strong><font size="2" face="Arial, Helvetica, sans-serif">Price ($)</font></strong></td> </tr> <? $netamt=0; for($k=0;$k<$count2;$k++) { $sqlt = executework("select product_modelid,product_name,product_category from product where product_id=" . $row[order_product_id]); $countt=@mysql_num_rows($sqlt); $rowt=@mysql_fetch_array($sqlt); $mid1=$rowt["product_modelid"]; $mname=$rowt["product_name"]; $mcat=$rowt["product_category"]; ?> <tr align="center" bordercolorlight="#0066FF" bgcolor="#FFEAD9"> <td colspan="7" bgcolor="#EEF2F7"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr align="center" bordercolor="#FFFFFF"> <td width="10%"><div align="left"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $k+1 ?></font></div></td> <td width="18%"><div align="left"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $mid1 ?></font></div></td> <? if (!empty($row["order_product_weight"])) { ?> <td width="21%"><div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $mname ?> </font></div></td> <? } else { ?> <td width="21%"><div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $mname ?> </font></div></td> <? } ?> <td width="12%"><div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $row["order_product_upriced"] ?></font></div></td> <td width="12%" align="right"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $cwt ?> (gms)</font></td> <? if ($mcat=="free") { ?> <td width="6%" align="center"><font size="2" face="Arial, Helvetica, sans-serif"><a href="shoppingcart.php?remove=<? echo $row[temp_id] ?>&rpage=<? echo $rpage ?>">Remove</a></font></td> <input name="text<? echo $k ?>" type="hidden" value="<? echo $row[order_product_qty] ?>" size="2" maxlength="2"> <? } else { ?> <td width="14%"> <div align="right"> <input name="text<? echo $k ?>" id="text<? echo $k ?>" type="text" value="<? echo $row[order_product_qty] ?>" size="2" maxlength="2" > </div></td><? } $totprice=($row["order_product_qty"]* $row["order_product_upriced"]); $netamt=$netamt+$totprice; ?> <td width="17%" align="right"><font size="2" face="Arial, Helvetica, sans-serif"><? echo $totprice ?></font></td> </tr> <? if ($mcat=="cake") { ?> <tr> <td colspan="7" align="center" valign="top" bordercolor="#FFFFFF"> </td> </tr> <? } else { ?> <br> <? } ?> </table></td> </tr> <input type="hidden" name="qid<? echo $k ?>" value="<? echo $row[temp_id] ?>"> <? $row=@mysql_fetch_array($sql0); } ?> <input type="hidden" name="nrec" value="<? echo $count2 ?>"> <tr bgcolor="#FFC99D"> <td colspan="6" align="right" bgcolor="#B7C8D9"><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Total Price : </font></strong></div></td> <td align="right" bgcolor="#B7C8D9"><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif"> <? echo $netamt ?></font></strong></div></td> </tr> <tr bgcolor="#FFF3EA"> <td colspan="7" align="left" bgcolor="#EEF2F7"> <table width="99%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="69%"><strong><font size="2" face="Arial, Helvetica, sans-serif">you can enter special instruction and message with this order here</font></strong> </td> <td width="31%"> <div align="right"> <textarea rows=2 cols="20" name="spmess"><? echo $spmess ?></textarea> </div></td> </tr> </table></td> </tr> <? if ($netamt==0.00) { } else { ?> <tr bgcolor="#FFF3EA"> <td colspan="7" align="left" bgcolor="#EEF2F7"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Shipping charge will be added to the total amount according to the delivery area you will choose upon checkout. To view shipping charges </font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="javascript:mnat()"><strong>click here</strong></a></font></td> </tr> <? } ?> <tr bgcolor="#FFE4CE"> <td colspan="7" align="left" bgcolor="#EEF2F7"> </td> </tr> <tr align="center" bgcolor="#FFC99D"> <td colspan="7" bgcolor="#B7C8D9"><input type="button" name="Button" value="Continue Shopping" onClick="manasan1('<? echo $rpage ?>')"> <input type="submit" name="Submit2" value="Update Cart" > <input type="button" name="Submit3" value="Checkout" onClick="manasan2('checkout.php')"></td> <input type="hidden" name="direct" value=""> <input type="hidden" name="redirect" value=""> </tr> <? } else { ?> <tr> <td colspan="7" align="right"> </td> </tr> <tr> <td colspan="7" align="right"> </td> </tr> <tr> <td colspan="7" align="center"><strong><font size="2" face="Arial, Helvetica, sans-serif">No Items in Your Carts.</font></strong></td> </tr> <tr> <td colspan="7" align="center"> </td> </tr> <tr align="center"> <td colspan="7"><input type="button" name="Submit" value="Continue shopping" onClick="location.href='<? echo $rpage ?>'"></td> </tr> <? } } ?> </table> </div> </form> <!--</td> </tr> </table> --> <map name="map"> <area shape="circle" coords="167,13,11" href="index.php"> <area shape="circle" coords="123,30,15" href="security.php"> <area shape="circle" coords="74,46,14" href="shoppingcart.php?rpage=<? echo $rpage ?>"> <area shape="circle" coords="20,59,17" href="members.php"> <area shape="circle" coords="154,34,3" href="#"> <area shape="rect" coords="54,67,107,81" href="shoppingcart.php?rpage=<? echo $rpage?>"> <area shape="rect" coords="2,84,118,99" href="members.php"> <area shape="rect" coords="111,50,154,65" href="security.php"> <area shape="rect" coords="151,32,190,44" href="index.php"> </map> <map name="Map2"> <area shape="rect" coords="1,2,104,20" href="shipping.php"> <area shape="rect" coords="103,1,175,21" href="aboutus.php"> <area shape="rect" coords="175,2,226,19" href="shoppingcart.php?rpage=<? echo $rpage ?>"> </map> <map name="Map3"> <area shape="rect" coords="1,3,22,19" href="shoppingcart.php?rpage=<? echo $rpage?>"> <area shape="rect" coords="24,2,123,20" href="track.php"> <area shape="rect" coords="128,2,207,17" href="contactus.php"> </map> <map name="Map4"> <area shape="rect" coords="4,11,166,89" href="index.php"> </map> <map name="Map5"> <area shape="rect" coords="1,11,62,89" href="index.php"> </map> <? // -----------------------------include footer-------------------------------------- include_once("footer1.php"); ?> </body> </html>
  7. Hi there, Actually the form is one of e-commerce form. n' it is a very lengthy form. can i post it here?
  8. Hi all, I"ve a form in php. In that form i "ve 2 submit buttons & 1 normal button. The problem is when ever i click any button, i have to proceed to a particular function. But i'm not able to proceed. I'm able to enter into the function. But able to proceed at form field validation. In error console, it displaying an error like document.form1.nrec is not defined.This error is for every form field. Is there any problem with the form. Please help me.
  9. Hi all, I am trying to install Joomla. After Joomla setup i am trying to install Joomla.Opened http://localhost/joomla15. then i got error like this. Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost 05/02/09 17:19:59 Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0 What is the problem. Anybody can help?
  10. Hi all, I"ve a form in php. In that form i "ve 2 submit buttons & 1 normal button. The problem is when ever i click any button, i have to proceed to a particular function. But i'm not able to proceed. I'm able to enter into the function. But not able to proceed at form field validation. In error console, it displaying an error like document.form1.nrec is not defined.This error is for every form field. Is there any problem with the form. Please help me.
  11. <form action="fgallery.php" method="post" enctype="multipart/form-data" name="form1" id="form1" onsubmit="return validate(this);" > <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="30%" height="34"><div align="right" class="style5 style3 style8">News Category</div></td> <td width="5%"><div align="center" class="style5 style3 style8">:</div></td> <? $selcat=executework("select distinct subcategory,id from big_main where category='movie' order by id"); $cntcat=@mysql_num_rows($selcat); ?> <td width="65%"><div align="left" class="style7"> <select name="cat" id="cat"> <option value="SELECT CATEGORY" selected="selected">SELECT CATEGORY</option> <? while($rowcat=@mysql_fetch_array($selcat)) { if($rowcat[subcategory]!="") { ?> <option value="<? echo $rowcat[id] ?>" ><? echo $rowcat[subcategory] ?></option> <? } } ?> </select> </div></td> </tr> <tr> <td height="36"><div align="right" class="style5"> Head Line</div></td> <td><div align="center" class="style5">:</div></td> <td><div align="left"><span class="style3"><span class="style3"></span></span><span class="style7"> <input name="topic" type="text" id="topic" size="50" /> <span class="style8"> </span></span> </div> </td> </tr> <tr> <td height="38"><div align="right" class="style5"> Photo 1 </div></td> <td><div align="center" class="style5">:</div></td> <td><div align="left"><span class="style3"><span class="style3"><span class="style3"><span class="style8"><span class="style8"></span></span></span></span></span> <label> <input name="photos1" type="file" id="photos1" /> <input name="capt1" type="text" id="capt1" value="Caption Here........................." size="40" /> </label> </div></td> </tr> <tr> <td height="38"><div align="right" class="style5"> Photo 2 </div></td> <td><div align="center" class="style5">:</div></td> <td><div align="left"><span class="style3"><span class="style3"><span class="style3"><span class="style8"><span class="style8"></span></span></span></span></span> <label> <input name="photos2" type="file" id="photos2" /> </label> <input name="capt2" type="text" id="capt2" value="Caption Here........................." size="40" /> </div></td> </tr> <tr> <td height="36"><div align="right" class="style5"> Photo 3 </div></td> <td><div align="center" class="style5">:</div></td> <td><div align="left"><span class="style3"><span class="style3"><span class="style3"><span class="style8"><span class="style8"></span></span></span></span></span> <label> <input name="photos3" type="file" id="photos3" /> </label> <input name="capt3" type="text" id="capt3" value="Caption Here........................." size="40" /> </div></td> </tr> <tr> <td height="36"><div align="right" class="style5"> Photo 4 </div></td> <td><div align="center" class="style5">:</div></td> <td><div align="left"><span class="style3"><span class="style3"><span class="style3"><span class="style8"><span class="style8"></span></span></span></span></span> <label> <input name="photos4" type="file" id="photos4" /> </label> <input name="capt4" type="text" id="capt4" value="Caption Here........................." size="40" /> </div></td> </tr> <tr> <td height="27"><div align="right" class="style5"> Photo 5 </div></td> <td><div align="center" class="style5">:</div></td> <td><div align="left"><span class="style3"><span class="style3"><span class="style3"><span class="style8"><span class="style8"></span></span></span></span></span> <label> <input name="photos5" type="file" id="photos5" /> </label> <input name="capt5" type="text" id="capt5" value="Caption Here........................." size="40" /> </div></td> </tr> <tr> <td height="27" colspan="3"><div align="left"><span class="style3"><span class="style3"><span class="style3"><span class="style8"><span class="style8"></span></span></span></span></span> <label></label> </div></td> </tr> <tr> <td height="43" colspan="3"><div align="center"><span class="style3"><span class="style3"></span></span> <input type="submit" name="Submit" value="Submit" /> </div> <div align="center"><span class="style3"><span class="style3"></span></span></div> <div align="left"><span class="style3"><span class="style3"></span></span></div></td> </tr> <tr> <td><div align="right"><span class="style3"><span class="style3"></span></span></div></td> <td><div align="center"><span class="style3"><span class="style3"></span></span></div></td> <td><div align="left"><span class="style3"><span class="style3"></span></span></div></td> </tr> </table> </form> This is the form i created. Using this i'm trying to upload photos. After submitting the form photos are not posting properly. Is there any error in the form?
  12. Hi all.., I"ve a form to upload images to a photo gallery. While uploading the image it didn't worked. I "ve tried to echo the image name. There i'm getting some path like this instead of getting the image name. photo=/tmp/php23PmhX What could be the problem. Please help me solving this problem.Thanks in advance.
  13. Hi all, I "ve a form named schedule.php where i can display the schedule of a particular month as a calender. I"ll get month,year to that form on GET method. using that month & year i"ve to find out the last date of the month. i"ve a code to find last date of the previous month or last month 1 year later or 1 year before like this. but here i want to get for random month. Any suggestions please. Here i'm giving the code line. $endate=date('t',strtotime('-1 month'));//for previous month $endate1=date('t',strtotime('+1 month'));//for next month But i need random. can i use a variable in the place '-1 month' or '+1 month'. Please help me.
  14. Thanks for your help. It works. And How can I calculate age? By manual coding or is there any particular solution(single line) to find the time difference. If so, Can you give me that code. Thank you once again.
  15. Hi all, I"ve a form in which i "ve to validate using age. i"ve a text box called 'DateOfBirth' which inputs date of birth using a pop up calender. Using that i"ve to calculate the age of the user on change. For this i'm using a java script function onChange event for the field 'DateOfBirth'. In that function i"ve taken the Date() to take present date. That function displays the date as ddd mmm dd yyyy HH:MM:ss format like Fri Jan 09 2009 14:55:21. Here i should get the date in dd mm yyyy format. How can I get it. And how can I calculate the age. Can anyone help me.
  16. HI all I"ve posted the same post before couple of days also. I didn't get any solution. I'm in confusion that is there any solution for this or not. At least let me know this weather there is a solution or not. Then i"ll take the alternative. please help me.
  17. I "ve a code to send mail. It's working for Gmail. But not with Yahoo and other SMTP mail ids. Here i'm giving the code. I'm getting this problem very frequent. So anyone of you please give me a solution. here the code follows $tom="sandy@yahoo.com" ; $subject="Comments from $name"; $msg = $strhtml; //Body of the mail assigned in this variable. $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: $name< $email > \r\n"; mail($tom, $subject, $msg, $headers); Thanks in advance.
  18. Here I am giving code. $em="sandy@gmail.com,sandy@yahoo.com"; $tom=trim($em); $subject="Sales: Registration Request Information of ".trim($_POST[fname]); $msg = $strg; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".trim($_POST[email)."\r\n"; mail($tom, $subject, $msg, $headers);
  19. hi all, I am trying to send a mail using php to two mail ids one could be yahoo mail id and other could be other ones like gmail or some personnel servers. i'm getting problem with yahoo and personnel servers. what could be the problem? Is there any code to solve this problem. I'm giving code also what i"ve wrote. If anybody knows the solution please help me.
  20. Thank you very much. code worked properly after uploading the csv file to the server. thank u very much.
  21. Basically it's not possible to give them the access to php MyAdmin in this case. So, Please give me a solution.
  22. Yes i"ve the access to PhpMyAdmin. But I am developing the admin tool for the clients. Through that they can easily upload the data to the database. what is the error in that code?
  23. Hi all, please give me a solution for this. I have converted an Excel file into .csv file. And browsed from the form with the form field named 'csvfile'. And i'm trying to upload the form using the following code. $file1=$_FILES['csvfile']['name']; $lines = file($file1); foreach ($lines as $line) { $cols = explode(';', $line); mysql_query("INSERT INTO aop_class (catid, orgname, address, city, country, phone, description) VALUES(".trim($cols[0]).",'".trim($cols[1])."','".trim($cols[2])."','".trim($cols[3])."','".trim($cols[4])."','".trim($cols[5])."','".trim($cols[6])."')") or die(mysql_error()); But, after execution i'm getting the following wornings Warning: file(): Unable to access class1.csv in /home/sphoor21/public_html/mitrahelp/admin/classified.php on line 165 Warning: file(class1.csv): failed to open stream: Permission denied in /home/sphoor21/public_html/mitrahelp/admin/classified.php on line 165 So, Please tell me what is happening her. How can I upload a csv file to the database. Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.