Jump to content

Colton.Wagner

Members
  • Posts

    157
  • Joined

  • Last visited

Everything posted by Colton.Wagner

  1. Call the host directly and ask them. It changes from host to host and I have a feeling it is something they statically control on there end. Let me know if they are able to help you. It should be possible I know with Go-Daddy and Host Gator you can make the changes yourself throught the control panel. I have never used your host though so I am not going to be much help there.
  2. I found the actual error: $ChannelConfig = mysql_query("SELECT * FROM Channel_Configuration WHERE id='" . $uid . "' AND Number='" . $Sensor_Number . "'"); if(!$ChannelConfig){ die(mysql_error()); } if($configuration = mysql_fetch_array($ChannelConfig)){ $data[0] = array("Time", $configuration['Name']); } echo $data[0][0] . $data[0][1]; the echo at the end should display the contents of the array. Being Time and whatever is queiered from the database. Instead it returns nothing. I resolved the issue because I needed to subtract one from the $Sensor_Number. Thanks for all who were interested.
  3. Although I am not farmiliar with your current host if they are running windows the following may help. Note that under windows you just need to uncomment the line ;extension=php_sockets.dll so that it looks like extension=php_sockets.dll This can be edited in your PHP.ini, that is if they give you access to it. Basically you are trying to listen to a specific port and more than likely the ip address: 0.0.0.0 which is all IP address'. Socket listening is just a way to accept TCP connection outside of port 80. Your host may not allow for socket_listeners as it can be a real security threat. Also your host would have to allow a pinhole for public access on whatever port it is you are trying to bind. Hope I was helpful!
  4. Hello All, I am working on a project that pulls data from a mysql database and formatts it into json. It is encoded into json so that Google Charts API can plot the points for me. I had the code working previously but since I have updated the database I am having issues. I will list both sources of code below. First this is the code that is working properly: <?php // Include functions file for ease of access require_once("./includes/functions.php"); // Connect to Mysql Database $mysql = new mysql; $mysql->connect(); $mysql->database("Advance_Tek"); // Define Universal ID to query results. $uid = $_GET['uid']; $Sensor = $_GET['sensor']; $find = mysql_query("SELECT * FROM Device WHERE id='$uid'"); if($result = mysql_fetch_array($find)){ $data[0] = array("Time", $result[$Sensor]); $devicename = $result['Device_Name']; } switch ($_GET['action']) { case date_range: $query = mysql_query("SELECT * FROM (SELECT * FROM Live_Data WHERE uid='$uid' AND Post_Date BETWEEN '$_GET[from]' AND '$_GET[to]' ORDER BY id DESC) tmp ORDER BY tmp.id ASC"); if(!$query){ echo mysql_error(); } $num = mysql_num_rows($query); for ($i=1; $i<($num+1); $i++){ $data[$i] = array(mysql_result($query, $i-1, "Post_Time"), mysql_result($query, $i-1, $Sensor)); } echo json_encode($data, JSON_NUMERIC_CHECK); break; case time_range: //echo date_default_timezone_get(); date_default_timezone_set("US/Central"); $CurrentTime = date("H:i:s"); $CurrentDate = date("Y-m-d"); list($CurrentHour, $CurrentMinutes, $CurrentSeconds) = explode(':', $CurrentTime); list($FromHour, $FromMinutes, $FromSeconds) = explode(':', $_GET['from']); $StartTime = ($CurrentHour - $FromHour) . ":" . ($CurrentMinutes - $FromMinutes) . ":" . ($CurrentSeconds - $FromSeconds); //echo $StartTime . " To: " . $CurrentTime; $query = mysql_query("SELECT * FROM (SELECT * FROM Live_Data WHERE uid='$uid' AND Post_Date='$CurrentDate' AND Post_Time BETWEEN '$StartTime' AND '$CurrentTime' ORDER BY id DESC) tmp ORDER BY tmp.id ASC"); if(!$query){ echo mysql_error(); } $num = mysql_num_rows($query); for ($i=1; $i<($num+1); $i++){ $data[$i] = array(mysql_result($query, $i-1, "Post_Time"), mysql_result($query, $i-1, $Sensor)); } echo json_encode($data, JSON_NUMERIC_CHECK); break; default: $query = mysql_query("SELECT * FROM (SELECT * FROM Live_Data WHERE uid='$uid' ORDER BY id DESC LIMIT 20) tmp ORDER BY tmp.id ASC"); if(!$query){ $content.= mysql_error(); } $num = mysql_num_rows($query); for ($i=1; $i<($num+1); $i++){ $data[$i] = array(mysql_result($query, $i-1, "Post_Time"), mysql_result($query, $i-1, $Sensor)); } echo json_encode($data, JSON_NUMERIC_CHECK); } ?> Using the get method: json_live_data.php?uid=1&sensor=A00 it returns the following output. [["Time","Flow & GPM"],["17:16:39",5.15],["17:21:39",5.08],["17:26:39",5.44],["17:31:39",4.87],["17:36:40",5.44],["17:41:40",6.15],["17:42:30",6.15],["17:46:42",5.78],["17:47:07",6.15],["12:09:50",4.36],["12:10:02",10.19],["12:10:13",10.19],["12:10:25",10.17],["12:10:37",10.1],["12:10:49",10.1],["12:11:01",10.06],["12:11:12",10.07],["12:11:24",10.06],["12:11:37",10.05],["12:11:49",10.15]] This is the code that was working for me prior to updating. Below is the code that is currently giving me grief. <?php // Include functions file for ease of access require_once("./includes/functions.php"); // Connect to Mysql Database $mysql = new mysql; $mysql->connect(); $mysql->database("Advance-Tek"); // Define Universal ID to query results. $uid = $_GET['uid']; $Sensor = $_GET['sensor']; $find = mysql_query("SELECT * FROM Device WHERE id='$uid'"); if($result = mysql_fetch_array($find)){ $devicename = $result['Device_Name']; } $Sensor_Number = ltrim($Sensor,'CH_'); $ChannelConfig = mysql_query("SELECT * FROM Channel_Configuration WHERE id='" . $uid . "' AND Number='" . $Sensor_Number . "'"); if($configuration = mysql_fetch_array($ChannelConfig)){ $data[0] = array("Time", $configuration['Name']); } switch ($_GET['action']) { case date_range: $query = mysql_query("SELECT * FROM (SELECT * FROM Live_Data WHERE Device_ID='$uid' AND Date BETWEEN '$_GET[from]' AND '$_GET[to]' ORDER BY id DESC) tmp ORDER BY tmp.id ASC"); if(!$query){ echo mysql_error(); } $num = mysql_num_rows($query); for ($i=1; $i<($num+1); $i++){ $data[$i] = array(mysql_result($query, $i-1, "Time"), mysql_result($query, $i-1, $Sensor)); } echo json_encode($data, JSON_NUMERIC_CHECK); break; case time_range: //echo date_default_timezone_get(); date_default_timezone_set("US/Central"); $CurrentTime = date("H:i:s"); $CurrentDate = date("Y-m-d"); list($CurrentHour, $CurrentMinutes, $CurrentSeconds) = explode(':', $CurrentTime); list($FromHour, $FromMinutes, $FromSeconds) = explode(':', $_GET['from']); $StartTime = ($CurrentHour - $FromHour) . ":" . ($CurrentMinutes - $FromMinutes) . ":" . ($CurrentSeconds - $FromSeconds); //echo $StartTime . " To: " . $CurrentTime; $query = mysql_query("SELECT * FROM (SELECT * FROM Live_Data WHERE Device_ID='$uid' AND Date='$CurrentDate' AND Time BETWEEN '$StartTime' AND '$CurrentTime' ORDER BY id DESC) tmp ORDER BY tmp.id ASC"); if(!$query){ echo mysql_error(); } $num = mysql_num_rows($query); for ($i=1; $i<($num+1); $i++){ $data[$i] = array(mysql_result($query, $i-1, "Time"), mysql_result($query, $i-1, $Sensor)); } echo json_encode($data, JSON_NUMERIC_CHECK); break; default: $query = mysql_query("SELECT * FROM (SELECT * FROM Live_Data WHERE Device_ID='$uid' ORDER BY id DESC LIMIT 20) tmp ORDER BY tmp.id ASC"); if(!$query){ $content.= mysql_error(); } $num = mysql_num_rows($query); for ($i=1; $i<($num+1); $i++){ $data[$i] = array(mysql_result($query, $i-1, "Time"), mysql_result($query, $i-1, $Sensor)); } echo json_encode($data, JSON_NUMERIC_CHECK); } ?> Using the GET method: json_live_data.php?uid=1&sensor=CH_1 it returns the following: {"1":["15:05:54","343.324"],"2":["15:06:41","343.324"],"3":["15:08:22","343.324"],"4":["15:37:21","343.324"],"5":["15:43:17","343.324"],"6":["15:43:34","343.324"],"7":["15:51:52","352.861"],"8":["15:52:10","343.324"],"9":["15:52:28","1.953"],"10":["15:53:37","362.398"],"11":["16:02:58","3.906"],"12":["16:49:46","362.398"],"13":["12:57:25","343.324"],"14":["12:59:20","0.299"],"15":["12:59:56","0.299"],"16":["13:00:34","0.299"],"17":["13:01:11","0.299"],"18":["13:26:12","181.281"],"19":["13:26:49","181.302"],"20":["13:27:26","181.302"]} Now I am trying to get Json_Encode to remove the Objects listed at the beggining with the current array number. Is there a simple fix for this issue any help would be greatly appreciated! Thank you for your time!
  5. My problem is that the following query will return more than just the data between two times on a specific date. Here is the mysql statement I am using. SELECT * FROM Live_Data WHERE uid='$uid' AND Post_Date='$CurrentDate' AND Post_Time BETWEEN '$StartTime' AND '$CurrentTime' ORDER BY id DESC When it is being processed this is how the variables are filled in: SELECT * FROM Live_Data WHERE uid='1' AND Post_Date='2013-12-05' AND Post_Time BETWEEN '14:20:00' AND '14:50:00' ORDER BY id DESC This query will return values on occasion but will generally return nothing. Have I done something wrong in my statement above? Advanced thanks for anyone who assists me with this issue. Thanks, Colton Wagner
  6. Hello, I am trying to query my mysql database to return data based on a date range set. here is the code that is returning an empty set. The format is accepeted but will never return anything. Any help would be greatly appreciated. SELECT * FROM (SELECT * FROM Live_Data WHERE uid='1' 'Post_Date' >= \"2013-11-21\" AND 'Post_Date' <= \"2013-11-22\" ORDER BY id DESC) tmp ORDER BY tmp.id ASC or SELECT * FROM (SELECT * FROM Live_Data WHERE uid='$uid' 'Post_Date' BETWEEN '2013-11-21' AND '2013-11-22' ORDER BY id DESC) tmp ORDER BY tmp.id ASC
  7. Hello, So I am having a bit of an issue with some forms I am working with. Let me first descirbe the issue at hand then we will get to my request for help. So I have 3 tables set up with roughly 120 columns. Not all of these columns will contain data as it is based on users entry. Basically what I am trying to do is have the id from the first table match that of the second and third. The script is hit and miss right now by using the mysql_insert_id() function. I would like to let these databases manage themselves and correlate there id's so all three forms can be queried by user id. I thank you for all of your time in advanced hope you can be of assistance!
  8. Thank you for the advice on the structure of my code. I will take this into account when writing in the future as well. Thank you this solved my problem. I will be sure to remove the blank AI id field as it is pointless to be included. As for the structure of my coding I will be sure to break it down in to multiple lines so that finding errors and all around readability will be easy. Thank you for the advice.
  9. So I have a form that I am making submit itself to database so that it can be pulled up at a later time. Basically the problem I am having is that Mysql sends me an error of: MYSQL ERROR:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1', '2', '3', '2', '1', '0', '1', '2', '3', '2', '1', '0', '1', '2', '3', '2', '' at line 1 The numbers you see above are the actual data that needs to be entered. The code that is causing this issue can be seen here: $query = mysql_query("INSERT INTO vanderbilt_adhd_diagnostic (id, Patient_Name, Date_Recieved, Date_Of_Birth, Age, Grade, Attention_To_Detail, Sustaining_Activites, Listening, Following_Instructions, Organization, Mental_Effort, Loses_Items,Easily_Distracted, Forgetful, Fidgets, Leaves_Seat, Runs_About, Difficulty_Engaging, On_The_Go, Talks_Excessivly, Blurts_Answers, Difficulty_Waiting, Interrupts, Argues, Loses_Temper, Refuses_To_Comply, Deliberately_Annoys, Blames_Others, Touchy, Angry, Spiteful, Bullies, Starts_Fights, Cons_Others, Skips_School, Physically_Cruel, Stolen_Items, Destroys_Property, Uses_Weapons, Cruel_Animals, Arson, Forced_Entry, Stays_Out, Run_Away, Rape, Fearful, Afraid_Of_New_Things, Worthless, Guilty, Lonely, Depressed, Self_Conscious) VALUES ('', '$Patient_Name', '$Date_Recieved', '$Date_Of_Birth', '$Age', '$Grade', '$Attention_To_Detail', '$Sustaining_Activites', '$Listening', '$Following_Instructions', '$Organization', '$Mental_Effort', '$Loses_Items, '$Easily_Distracted', '$Forgetful', '$Fidgets', '$Leaves_Seat', '$Runs_About', '$Difficulty_Engaging', '$On_The_Go', '$Talks_Excessivly', '$Blurts_Answers', '$Difficulty_Waiting', '$Interrupts', '$Argues', '$Loses_Temper', '$Refuses_To_Comply', '$Deliberately_Annoys', '$Blames_Others', '$Touchy', '$Angry', '$Spiteful', '$Bullies', '$Starts_Fights', '$Cons_Others', '$Skips_School', '$Physically_Cruel', '$Stolen_Items', '$Destroys_Property', '$Uses_Weapons', '$Cruel_Animals', '$Arson', '$Forced_Entry', '$Stays_Out', '$Run_Away', '$Rape', '$Fearful', '$Afraid_Of_New_Things', '$Worthless', '$Guilty', '$Lonely', '$Depressed', '$Self_Conscious')"); Obviously I have something syntaxually wrong. If someone could give me a little assistance that would be wonderful! Thank you for your time in advanced.
  10. I wrapped the line in parenthesis like you requested but it still did not resolve the issue. Here is an example: if(($row = mysql_fetch_array($query)) && ($row['Password'] == $encrypt->password($_POST['CurrentPassword']))){ I'm going to try a var_dump() now and see if that works.
  11. Absolutely, It does not display anything and when I check the error logs nothing is prevelant.
  12. Heres the entire snippet. Let me know what you think. if(!isset($_GET['sub']) || ($_GET['sub'] == 1)) { // Display Current Settings if(!isset($_GET['edit']) && ($_GET['edit'] != "true")) { $content = "<div id=\"TopNavLeft\"></div>"; $content .= "<div id=\"BlueHeader\">Edit Personal Settings</div>"; $content .= "<div id=\"CMSMain\">"; $content .= "<table width=\"700\"><form action=\"./?tier=3&sub=1&edit=true\" method=\"post\" name=\"Edit Settings\">"; $content .= "<tr><td colspan=\"3\">Please verify that the information listed below is correct.</td></tr>"; // Query Current Record in Database $Username = $_SESSION['Username']; $query = mysql_query("SELECT * FROM adminusers WHERE Username='$Username'"); // Fetch the information and display it if($row = mysql_fetch_array($query)){ $content .= "<tr><td style=\"width: 150px;\">Username</td><td style=\"width: 150px;\">:</td><td><input type=\"text\" name=\"Username\" value=\"" . $row['Username'] . "\" readonly=\"readonly\" size=\"35\" /></td></tr>"; $content .= "<tr><td>First Name</td><td>:</td><td><input type=\"text\" name=\"First_Name\" value=\"" . $row['First_Name'] . "\" size=\"35\" /></td></tr>"; $content .= "<tr><td>Last Name</td><td>:</td><td><input type=\"text\" name=\"Last_Name\" value=\"" . $row['Last_Name'] . "\" size=\"35\" /></td></tr>"; $content .= "<tr><td>Email</td><td>:</td><td><input type=\"text\" name=\"Email\" value=\"" . $row['Email'] . "\" size=\"35\" /></td></tr>"; $content .= "<tr><td colspan=\"3\"> </td></tr>"; $content .= "<tr><td>Current Password</td><td>:</td><td><input type=\"password\" name=\"Current_Password\" size=\"35\" /></td></tr>"; $content .= "<tr><td>New Password</td><td>:</td><td><input type=\"password\" name=\"New_Password\" size=\"35\" /></td></tr>"; $content .= "<tr><td>Verify Password</td><td>:</td><td><input type=\"password\" name=\"Verify_Password\" size=\"35\" /></td></tr>"; $content .= "<tr><td colspan=\"2\"> </td><td style=\"text-align: left\"><input type=\"submit\" value=\"Submit\" /></td></tr>"; } $content .= "</form></table></div>"; } else { // Insert the header $content = "<div id=\"TopNavLeft\"></div>"; $content .= "<div id=\"BlueHeader\">Personal Settings Updated</div>"; $content .= "<div id=\"CMSMain\">"; // Verify Current Password, Validity of Email, and that Passwords Match. $query = mysql_query("SELECT * FROM adminusers WHERE Username='$_SESSION[username]'"); if($row = mysql_fetch_array($query) && ($row['Password'] == $encrypt->password($_POST['Current_Password']))){ if($check->email($_POST['Email']) == true){ if($check->password($_POST['New_Password'],$_POST['Verify_Password']) == true){ //Encrypt the password and Update the database. $Password = $encrypt->password($_POST['New_Password']); $edit->admin($_SESSION['Username'], $Password, $_POST['First_Name'], $_POST['Last_Name'], $_POST['Email']); $content .= "<p>Thank you, " . $_POST['First_Name'] . " " . $_POST['Last_Name'] . " your settings have been updated. Please make sure you check your messaging inbox regularly. Important security message(s) will be received directly into this inbox and it will help keep your website safe."; } else { // Passwords did not match each other. $content .= "<p>The passwords that you entered did not match each other. Please return to the previous screen and try again. If the problem remains persistent please contact your webmaster.</p>"; } } else { // Email address was not formatted properly. $content .= "<p>The email address that you entered does not appear to be valid. Please try the process again or contact your webmaster.</p>"; } } else { // Password was not correct. Please try again. $content .= "<p>There seems to be a problem. The password that you entered did not match our records. Please try again or contact your webmaster. " . $encrypt->password($_POST['Current_Password']) . " = " . $row['Password'] . "</p>"; } $content .= "</div>"; } }
  13. So here's the issue I am having. I have created an IF statement that is testing to see if the stored password is equal to the user entered password. They are both encrypted and I have verified that the two variables are equal to each other. So the question is why does it always come back false? if($row = mysql_fetch_array($query) && ($row['Password'] == $encrypt->password($_POST['Current_Password']))) I have verified that they are both equal to each other but it always goes to the else statment and prints an error. Any thoughts? I appreciate your time in advanced.
  14. After I posted this I found a solution myself. It's your code almost exactly but a little bit more messy. Thank you very much for your assistance.
  15. I am trying to generate the table below by pulling the information out of the database. The only issue I am having is the <tr> (Row) should have two <td> (Columns) inside it. <table> <tr> <td> Column #1 Row #1 </td> <td> Column #2 Row #1 </td> </tr> <tr> <td> Column #1 Row #2 </td> <td> Column #2 Row #2 </td> </tr> </table> Hopefully that makes sense here is the code I have so far: <?php $query = mysql_query("SELECT * FROM Doctoral_Biography ORDER BY Last_Name"); while($row = mysql_fetch_array($query)){ echo "<td align=\"center\"><h3><img src=\"". $row['Image'] ."\" alt=\"" . $row['First_Name'] . " " . $row['Last_Name'] . ", " . $row['Prefix'] . "\" width=\"100\" height=\"139\" class=\"docphotos\" /></h3>"; echo "<h3><a href=\"./doctors.php?action=bio&name=" . $row['Last_Name'] ."\">" . $row['First_Name'] . " " . $row['Last_Name'] . ", " . $row['Prefix'] . "</a></h3></td>"; } ?> Any help would be greatly appreciated. I thought about adding either a ternary operator or a for loop. Please let me know what the most efficient option would be. Thanks in advanced!
  16. You forgot to set your variable id if you notice you set the variable product but did not set the id. This should resolve the issue. <?php require_once ('./includes/config.inc.php'); require_once (MYSQL); $id = $_POST['id']; $product = $_POST['product']; $query = "UPDATE product SET product = $product WHERE prodID = '$id'"; $r = mysqli_query($dbc, $query); echo 'Database Updated!!'; ?>
  17. That was exactly what I needed thank you very much rep++. I posted the fix below for anyone who may be having the same issue. $navigation .= (!isset($_GET['sub']) || ($_GET['sub'] == 1)) ? "<li $selected>" : "<li>" . "<a href=\"?tier=1&sub=1\">Main</a></li>";
  18. The second $navigation variable I have set is where the issue is coming from. It seems I am not aloud to set an if statement within a variable. Can someone please show me a work around to this issue? Any help would be very much appreciated. $selected = "class=\"selected\""; $naviagtion = "<ul>"; $navigation .= "<li" . if(!isset($_GET['sub']) || ($_GET['sub'] == 1)) { return $selected; } . "><a href=\"?tier=1&sub=1\">Main</a></li>"; $naviagtion = "</ul>";
  19. If you would like them to be redirected to there own page you could possibly do it by forcing the GET method. Basically you call out the users ID from the database and place it in the header. Like so: header("location: member-index.php?id=(Insert the ID here)"); Thats one option that way the page member-index.php knows which user it is loading. Also another way would be to use sessions so you do not have to continue to set the GET method. There are plenty of ways to go about this hope I could be of some assistance!
  20. Pikachu2000, Thank you very much. I was wasting code and processing speed. You solved it with a quick command. Probably should have done a little more research but I was looking through php.info rather than Mysql. Thanks, Colton Wagner
  21. I have tried this for about 2 solid hours and I cannot figure out how to make multiple forms that have the same ID. Definition: I have 3 pages and they all have different information that needs to be placed into the database. I have no problem doing that the trouble comes when I try to make the 3 different database entry's have the same ID as the first form. My thought was to have the first form be completed then after the data was placed it would use mysql to pull the ID back out by using the WHERE clause to match the persons last name. //Connection to the Mysql_Database $con = mysql_connect("####", "####", "####"); if(!$con){ die("There was an error connecting to your mysql_database" . mysql_error()); } //Variables to be entered into Patient_Data $last_name = $_POST['last_name']; //Intialize and Select the correct database. mysql_select_db("####"); //Format the data for entry into the mysql Database. $query = mysql_query("INSERT INTO Patient_Data VALUES ('', '$last_name)"); //Verify that the operation has worked if(!$query){ die("Lost in Transmission!" . mysql_error()); } $id_find = mysql_query("SELECT * FROM #### WHERE last_name='$last_name'"); while($id = mysql_fetch_row($id_find)){?> <!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 name="MedicalHistory" action="https://evansvillesurgical.com/med-record.php?id=<?php echo $id['id'];}?>" enctype="application/x-www-form-urlencoded" method="post"> Any help would be greatly appreciated. Even if it's just describing in Pseduo code a better way to go about this. Thanks, Colton Wagner
  22. Correct for the most part it would be possible so long as I did not have to call another function to do so.
  23. That's what I figured I just am not aware of a pause is javascript that doesn't require you to call a new function. Sorry for the confusion. I guess a more appropriate question to ask would be. Is there a way to delay by a set time in javascript then continue from where the pause ended? Thanks again both of you are very helpful.
  24. Sorry, Why when I run this script or call the function does it cause latency and freeze the browser? Is there a better way to delay an infinite loop? As of right now it looks like I just programmed a processing nightmare. Thanks again for any help.
  25. I am trying to make a script that changes data in a div container every 6000 milliseconds. The php code is correct and I will have no problems fixing that if there are any tweaks needed. So far this is what I have. function variation(str){ var xmlhttp; if (str.length==0){ document.getElementById("variation").innerHTML=""; return; } 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("variation").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","./includes/variation.php?id="+str,true); xmlhttp.send(); } function variationTimer(){ for(i=1;i<4;i++){ variation(i); i++; if (i>=3){ i = 1; } setTimeout("variationTimer()",6000); } } I am very aware that it is an infinite loop however I want this to be endless so I do not want it to stop after so many revolutions. Any help would be much appreciated thank you!
×
×
  • 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.