Jump to content

jasmeet

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by jasmeet

  1. hii.. i want a travel search engine script in php website. i am searching for 2 to 3 days on it. but i dont know how to start. i searched on google. find sme APIs for it. but where to implement those APIs. what code i need to write for it. it would be grateful if anyone give some suggestions on this. thanks and regards.
  2. thankyou everyone for helping me with the script.
  3. sorry.
  4. not working. !!
  5. <script> $('.add_to').click(function(){ //alert(1); productId= $(this).attr('id'); //var grandTotal= $('#grandTotal').html(''); $('#sucessAdd').html('<img src="images/ajax-loader.gif" align="center" />'); //var grandTotalfloat= parseFloat(grandTotal); $.ajax({ type: "POST", url:"pass.php", data: {action:'addCatalog',productId:productId}, success:function(result){ //alert(result) if(result==1){//add_to_cat $('#'+productId).remove(); $('#'+productId).fadeTo("fast", .5); $('#sucessAdd').html(''); //$('#sucessAdd').css('color','green'); $('#sucessAdd').addClass('add-sucess'); $('#sucessAdd_'+productId).html('<font coloe="red"><b>Add Successfully</b></font>'); $("#"+productId).style.display="block"; } } }) }); </script> <div class="items_box_link"> <a href="#" id="<?php echo $productRow['id'];?>" class="add_to">ADD TO CART</a> </div> ..........................................////////////////////////////............................................ after add to cart, my page goes to top but i want it to remain dere only.. any help!.. thanks.
  6. in first row, i want to display image1, pink block, image2, yellowblock in second row, ...................black block, image3, red block, image4 in third row,........................image4, pink block, image5, yellowblock images are called dynamically using php.. any suggestions plz.. thanks.
  7. thanks for your reply .
  8. yes... but for this link, i need to create my own custom url rewriting..
  9. hello, on click this link, i am redirecting to page-listing-category.php page. and all listing are shown there. http://domain-name/listing-category/?a=hello but i want this link as http://domain-name/listing-category/hello ... i use this code in function.php add_rewrite_tag("%a%",'([0-9]+)'); $a = get_query_var("a"); // Wordpress way add_rewrite_rule('listing-category/([0-9]+)/?$', 'index.php?page_id=page-listing-category&a=$matches[1]', 'top'); add_rewrite_tag("%a%",'([0-9]+)'); add_rewrite_rule('listing-category/([0-9]+)/?$', 'index.php?page_id=page-listing-category&a=$matches[1]', 'top'); $wp_rewrite->flush_rules(); but, problem is the above isn't working ... can anypne suggest me something on this. ?? thanks.
  10. hi,, thankew very much....
  11. hi, i am not gud in ajax. i have this code... <html> <head> <title>Sum Html Textbox Values using jQuery/JavaScript</title> <style> body { font-family: sans-serif; } #summation { font-size: 18px; font-weight: bold; color:#174C68; } .txt { background-color: #FEFFB0; font-weight: bold; text-align: right; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> </head> <body> <table width="300px" border="1" style="border-collapse:collapse;background-color:#E8DCFF"> <tr> <td width="40px">1</td> <td>Butter</td> <td><input class="txt" type="text" name="txt"/></td> </tr> <tr> <td>2</td> <td>Cheese</td> <td><input class="txt" type="text" name="txt"/></td> </tr> <tr> <td>3</td> <td>Eggs</td> <td><input class="txt" type="text" name="txt"/></td> </tr> <tr> <td>4</td> <td>Milk</td> <td><input class="txt" type="text" name="txt"/></td> </tr> <tr> <td>5</td> <td>Bread</td> <td><input class="txt" type="text" name="txt"/></td> </tr> <tr> <td>6</td> <td>Soap</td> <td><input class="txt" type="text" name="txt"/></td> </tr> <tr id="summation"> <td> </td> <td align="right">Sum :</td> <td align="center"><span id="sum">0</span></td> </tr> </table> <script> $(document).ready(function(){ //iterate through each textboxes and add keyup //handler to trigger sum event $(".txt").each(function() { $(this).keyup(function(){ calculateSum(); }); }); }); function calculateSum() { var sum = 0; //iterate through each textboxes and add the values $(".txt").each(function() { //add only if the value is number if(!isNaN(this.value) && this.value.length!=0) { sum += parseFloat(this.value); } }); //.toFixed() method will roundoff the final sum to 2 decimal places $("#sum").html(sum.toFixed(2)); } </script> </body> </html> ..........................from net. this will add all the input fields and give us the total of it. but i want one more input field in which when i put some value . then, total amount should be subtracted from it and gives the result.. can anyone give me some suggestions.... please ????? thanks.
  12. i have used "ultimate seo addons" in my oscommerce site. all options are visible in admin panel. but frontend is not showing the seo generated url. it shows the default url www. mydomain.com/index.php?osCsid=u92bj4khesarof6mn4h0o1b3v0 www. mydomain.com/category.php?cPath=22&osCsid=u92bj4khesarof6mn4h0o1b3v0 n all but not url created by addon. please suggest something. thanks
  13. i have changed my url from .php to .html in oscommerce site but session stops working in that case. session works in pages having .php extension but session not works in pages with .html please any suggestions?
  14. <?php $query=mysql_query("select * from category where pid=1"); while($result=mysql_fetch_array($query)){ ?> <a href="space1.php?name=<?php echo $result['name']; ?>"><?php echo $result['name']; ?></a> <?php } ?> in htaccess : RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ space.php?name=$1 not working...
  15. i want to store youtube thumbnnail in my folder with resize option. http://img.youtube.com/vi/BoVBdxftEF8/0.jpg this is the image thumbnail file_put_contents ("video_thumbnails/thumb.jpg",file_get_contents("http://img.youtube.com/vi/BoVBdxftEF8/0.jpg")); but it shows errors!!!
  16. query used id select * from tablename where date between current date and "????" but i need to find missing dates ... ??/ i am not getting what comes in ????
  17. i have dates in mysql database : 03/09/2013 05/09/2013 06/09/2013 09/09/2013 these dates stored in database. i am not getting how to get missing dates from the table???
  18. <?php echo date("h:i:s"); ?> its output is : 12:05:04 but my system time shows: 3:35:01 i am not getting what function to use to match with system time??
  19. thanks!! it works..
  20. i am using sessions. first on admin folder and second on user folder. in admin folder, i use $_SESSION['username']; in user folder, i use $_SESSION['username1']; now when i click on logout button in localhost/xxx/admin/logout.php i also logged out from localhost/xxx/logout.php. is there a way.. not to be logged out from user panel when click logout button in admin panel????
  21. thankew ... 0xMatt.... :)
  22. if your image is stored in some folder like uploads/a.jpg you can use <img src="uploads/<?php echo $row['imagelocation']; ?>" /> or something else.. i suppose...!!!
  23. <table> <tr> <?php $query=mysql_query("select * from table1"); while($result=mysql_fetch_array($query)){ ?> <td><?php echo $result['country']; ?></td> <table> <?php $query_1=mysql_query("select * from table2 where id='$result[id]'"); while($result_1=mysql_fetch_array($query_1)){ ?> <tr><td><?php echo $result_1[''city"]; ?></td></tr> <?php } ?> </table> <?php } ?> </tr> </table>
  24. when i click on image1 with id=1, it stores in session and when i click on image2 with id=2, it stores in session too next to the first one, and when i click on image3 with id=3, it stores in session next to id=2. and so on.... i hope you understand what i am asking .... need help. i know how to get value from array.... like <?php// begin the sessionsession_start(); // create an array$my_array=array('cat', 'dog', 'mouse', 'bird', 'crocodile', 'wombat', 'koala', 'kangaroo'); // put the array in a session variable$_SESSION['animals']=$my_array; // a little message to say we have done itecho 'Putting array into a session variable';// loop through the session array with foreachforeach($_SESSION['animals'] as $key=>$value) { // and print out the values echo 'The value of $_SESSION['."'".$key."'".'] is '."'".$value."'".' <br />'; }?> /*************************************************************************************************************************************/ but wat i want is, cat ,dog,mouse,bird,crocodile,wombat,koala,kangaroo ... stored in array when i click on them.... i hope you understand.. please help!!! thanks and regards, jazz..
  25. i dnt understand what you r asking.... for connectivity on localhost..use.. $conn=mysql_connect("localhost","root",""); mysql_select_db("databasename",$conn); if on live server, use... $conn=mysql_connect("hostname","username","password"); mysql_select_db("databasename",$conn);
×
×
  • 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.