Jump to content

jwk811

Members
  • Posts

    714
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jwk811's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. yes that was what i was looking for lol thank you
  2. i know theres a way but i just forget. i want to do a switch function. switch ($_GET['page']) { case 0: include 'page'; break; case 1: include 'page1'; break; case 2: include 'page2'; break; default: include 'page'; } ?> just like that but if there is no $_GET page i just want it to do the default. instead of doing if isset GET page do switch else default page. i just want it to be simpler by doing something like switch(isset$_GET etc.
  3. ok at least i know im not crazy lol. i use godaddy. ill ask them about it but i doubt they will be able to do anything. maybe i should just change servers. any suggestions?
  4. i tried what you said. it shows the array. it shows the array with the data SOMETIMES just like it did with the form. this is absouletly crazy. someone please try it out yourself. put data in the text field and submit it. it works. then go back refresh form do it again. tell me if it doesnt work sometimes. and also on page 2. resend data. once resent it usually doesnt show data. http://frozenasfs.com/form/formp1.php i even tried it on two different website servers. and this is all thats on each page exactly. formp1.php <form method="post" action="formp2.php"> <input type="text" name="text" id="text"> <input type="submit"> </form> formp2.php <?php if (isset($_POST)){ var_dump ($_POST); }else{ echo "No POST data!"; }?>
  5. this is so frustrating. i know my coding isnt wrong. the most basic form doesnt even work (always). formp1.php <form method="post" action="formp2.php"> <input type="text" name="text" id="text"> <input type="submit"> </form> formp2.php <?php echo $_POST['text']; ?> heres the thing it works SOMETIMES. i send the form and it shows. i go back and do it again and it doesnt. another time it shows another time it doesnt. all the same text input to. i put the number 1. what could possibly do this? its not my browser i tried 2 different browsers. it makes no sense what so ever someone give me something PLEASE
  6. i made a quick example of the problem im having. at step 5 i dont get the data for some reason. and its weird because when i resend the data it usually works by clicking refresh page. is very frustrating and makes no sense. please help <?php if(!isset($_GET['step'])){ ?> <form method="post" action="form.php?step=2"> <input type="text" name="text" id="text"> <input type="submit"> </form> <?php } else if($_GET['step'] == 2){ ?> <form method="post" action="form.php?step=3"> <input type="hidden" name="text" id="text" value="<?php echo $_POST['text']; ?>"> <input type="text" name="text2" id="text2"> <input type="submit"> </form> <?php } else if($_GET['step'] == 3){ ?> <form method="post" action="form.php?step=4"> <input type="hidden" name="text" id="text" value="<?php echo $_POST['text']; ?>"> <input type="hidden" name="text2" id="text2" value="<?php echo $_POST['text2']; ?>"> <input type="text" name="text3" id="text3"> <input type="submit"> </form> <?php } else if($_GET['step'] == 4){ ?> <form method="post" action="form.php?step=5"> <input type="hidden" name="text" id="text" value="<?php echo $_POST['text']; ?>"> <input type="hidden" name="text2" id="text2" value="<?php echo $_POST['text2']; ?>"> <input type="hidden" name="text3" id="text3" value="<?php echo $_POST['text3']; ?>"> <input type="text" name="text4" id="text4"> <input type="submit"> </form> <?php } else if($_GET['step'] == 5){ echo $_POST['text']; echo $_POST['text2']; echo $_POST['text3']; echo $_POST['text4']; } ?>
  7. no i havent that will work but is there anyway i can make it call a function if a form field is selected already on refresh if its on the one that needs a function
  8. i have a select form. when they click a certain option a js function is used to change something. the problem is when the page is reloaded that option is automatically still selected even when i have another one auto selected. this makes it so the option that is supposed to cause a function is already selected and the function isnt done so it messes things up. how can i make it so i can change the default selected option or auto load a function if its going to be selected on refresh. (im not sure how confusing that was or not)
  9. oh ok i thought you could use order by and group by together. i wanted it to group but also in order by date. i can choose just one then if both isnt possible. thanks =]
  10. i have a column with different data examples ex1 ex2 ex1 ex2 ex1 ex2 when i select it i want to group them by the name so they will come out like this.. ex1 ex1 ex1 ex2 ex2 ex2 i thought thats what "group by" was for but it only brought up one of the data each like this ex1 ex2 how can i do this? thanks!
  11. i want to count one column but get other info from more than one table at the same time
  12. $sql = "SELECT sum(tbl1.number) FROM tbl1, tbl2"; it only works if i have one table when i add the second it doesnt work. i just need the sum in one column from one table i just need other info from the other table too it wont work tho. im getting an entirely different number for the sum.
  13. i have a select input on a form. i want the options to be long but the box they click smaller and cut off so when they click it it shows everything bigger. i tried stlying width and overflow hidden and stuff but i cant seem to get it to work. is this even possible?
  14. im having a problem where two requests are messing up eachother i have a chat on the page that uses ajax but i am also trying to use ajax to show data on the page. im not sure how to make 2 requests work together. this is the javascript page with the two functions and objects. i dont know what im doing this was my attempt that didnt work great. please help var xmlhttp = createObject(); var xmlhttp2 = createObject2(); var lastMessage = 0; var mTimer; function createObject() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else if(window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); } else { document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object. Consider upgrading your browser.'; } } function createObject2() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else if(window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); } else { document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object. Consider upgrading your browser.'; } } function getChatContent() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("chat_content").innerHTML=xmlhttp.responseText; //chat_div.innerHTML += '<p><div style="float:left;"><img src="' + avatar_node[0].firstChild.nodeValue + '" width="50"></div><div style="float:left;"><font class="chat_user">' + user_node[0].firstChild.nodeValue + '</font> <font class="chat_time">' + time_node[0].firstChild.nodeValue + '</font><br /><font class="chat_text">' + text_node[0].firstChild.nodeValue + '</font></div></p>'; document.getElementById("chat_content").scrollTop = document.getElementById("chat_content").scrollHeight; } } mTimer = setTimeout('getChatContent();',1000); xmlhttp.open("GET","http://" + location.host + "/lib/getMessage.php?chat=1",true); xmlhttp.send(); } function showWorkoutInfo(str) { if (str=="") { document.getElementById("workoutRoutines").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp2=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp2.readyState==4 && xmlhttp2.status==200) { document.getElementById("workoutRoutines").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getInfo.php?id="+str,true); xmlhttp.send(); }
  15. it works 9 outta 10 times now. so uhh i guess i can deal with it for now. if you have any other suggestions let me know thanks for your help =]
×
×
  • 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.