Jump to content

lovephp

Members
  • Posts

    530
  • Joined

  • Last visited

Everything posted by lovephp

  1. i did not double post guys. its different and the above working example not working i guess?
  2. friends how to add i hide option on the same button? and also whichever buton clicked it shows keep showing its content even after the page is refreshed? <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $(".buttons").click(function () { var divname= this.value; $("#"+divname).show("slow").siblings().hide("slow"); }); }); </script> </head> <body> <div id="buttonsDiv"> <input type="button" id="button1" class="buttons" value="div1"></input> <input type="button" id="button2" class="buttons" value="div2"></input> <input type="button" id="button3" class="buttons" value="div3"></input> <input type="button" id="button4" class="buttons" value="div4"></input> </div> <div> <div id="div1" style="display:none"> Hello World </div> <div id="div2" style="display:none"> Test </div> <div id="div3" style="display:none"> Another Test </div> <div id="div4" style="display:none"> Final Test </div> </div> </body> </html>
  3. its not fetching results and also giving error, could someone see whats wrong? <?php $contentVar = $_POST['contentVar']; if ($contentVar == "con1") { echo "My default content for this page element when the page initially loads"; } else if ($contentVar == "con2") { echo "This is content that I want to load when the second link or button is clicked"; } else if ($contentVar == "con3") { echo "Content for third click is now loaded. Any <strong>HTML</strong> or text you wish."; } ?> <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.js"></script> <script language="Javascript" type="text/javascript"> <!-- function swapContent(cv) { $("#myDiv").html('<img src="loader.gif"/>').show(); var url = "test.php"; $.post(url, {contentVar: cv} ,function(data) { $("#myDiv").html(data).show(); }); } //--> </script> <style type="text/css"> #myDiv{ width:200px; height:150px; padding:12px; border:#666 1px solid; background-color:#FAEEC5; font-size:18px; } </style> </head> <body> <a href="#" onclick="return false" onmousedown="javascript:swapContent('con1');">Content1</a> <a href="#" onclick="return false" onmousedown="javascript:swapContent('con2');">Content2</a> <a href="#" onclick="return false" onmousedown="javascript:swapContent('con3');">Content3</a> <div id="myDiv">My default content for this page element when the page initially loads</div> </body> </html>
  4. agree but this is the only way to get my work done else noway
  5. must i add like this?? $act = 'frm'; $string = ."aWYoJGFjdD09ZnJtKXsNCiRhY3QgPSAkX0dFVFsnYWN0J107DQplY2hvICd0ZXN0JzsNCn1lbHNlew0KfQ=="; eval(base64_decode($string));
  6. i am trying to include something from my server to another and keep doing changes time to time and do not want others to be able to change anything in the script act=frm
  7. this code is what i converted into base64 this if($act==frm){ $act = $_GET['act']; echo 'test'; }else{ } the output is this aWYoJGFjdD09ZnJtKXsNCiRhY3QgPSAkX0dFVFsnYWN0J107DQplY2hvICd0ZXN0JzsNCn1lbHNlew0KfQ== my question is how can i apply to my php script and also execute the sct=frm and get the echo 'test';
  8. i mean execute it how? i have converted it into base64 already now i want to access the act=frm
  9. guys i converted the folloing portion into base64 if($act==frm){ $act = $_GET['act']; echo 'test'; }else{ } aWYoJGFjdD09ZnJtKXsNCiRhY3QgPSAkX0dFVFsnYWN0J107DQplY2hvICd0ZXN0JzsNCn1lbHNlew0KfQ== now how can i use if please?
  10. Guys im unable to figure out where to get api key from google to get my google xml weather script to work again. guide please
  11. How to make a page where i store a few names like user1, user2, user3 etc etc and they come to the page and find a input box like enter ur name, if name is there and entered correctly it will show them details else error message? i do not need passwrd area. can someone help out please?
  12. i got it and it was soo simple $to_company = "${$cid}"; still thanks to you guys for the time u gave
  13. yes Jess im getting it and i did try it that way still its not happening wonder why
  14. no no global $cid01; //outputs someemail@somesite.com and $cid = $_SESSION['cid']; // outputs cid01 or cid02
  15. bro very sorry the value of $cid is cid01 which is in the session and Global $cid01 got a email id stored against it so does Global $cid02 and from session $cid either could come cid01 or cid02 which is coming anyways but just that when i use it in $to_company = "$cid"; no email gets sends
  16. global $cid would not work because cid only gets like string like cid01 from the form but Global $cid01 is in the config file which got email id stored against it
  17. ok this sends Global $cid01; Global $cid02; $cid = $_SESSION['cid']; $to = $fData['email']; $to_company = "$cid01"; this don't Global $cid01; Global $cid02; $cid = $_SESSION['cid']; $to = $fData['email']; $to_company = "$cid";
  18. me too dunno but if i do it this way $to_company = "$cid01"; then mail sends
  19. i really apologize for my way of writing. im not very good in explaining things. i actually want $to_company = 'abc123'; to be like want $to_company = '$abc123'; but currently its not happening the way i am doing $cid = $_SESSION['cid']; $to = $fData['email']; $to_company = "$cid"; the code above only prints $to_company = 'abc123'; i believe
  20. ok i explain again Global $cid01; Global $cid02; now $cid01 and $cid02 got email id stored in variable and $cid = $_SESSION['cid']; fetches only cid01 without $ when i add like this $to_company = "$cid01"; email sends but when i try $to_company = "$cid"; no email gets send
  21. i do not know either Jess lol i thought if i add the $cid it should fetch the emails but its not doing it
  22. back again ok now i got problem getting $ to the $cid which i fetch from $_SESSION it only prints the string not the $ and i have email ids stored by cid and if i do not get a $ in front of the cid the emails does not show up. whats the solution guys? $cid = $_SESSION['cid']; $to = $fData['email']; $to_company = "$cid";
  23. omg yes i had error reporting turned off ;-) thanks soo much for helping me fix it. cheers \m/
  24. yes very true. the moment i come from the link in print_r(); i do get to see the cid like cid=>prg1234 but now say i remove the cid=prg1234 http://www.mysite.com/form.php and refresh the page the print_r(); will not longer show cid=>prg1234 for its not getting stored in session at all
×
×
  • 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.