Jump to content

geudrik

Members
  • Posts

    115
  • Joined

  • Last visited

    Never

Everything posted by geudrik

  1. Am I missing a fundamental definition of what static means? /me scratches head The DATABASE class, as far as I would have though, is/was static - simply because it really doesn't do anything other than invoke a database connection/kill it. Given that neither are static, I should be calling my DATABASE connection as... <? $connect = new DATABASE; $connect->DoIt('1'); ?> Just like I'm calling my Login code currently.. correct? <? include("./classes/class.users.php"); $user = new USERS; $user->login($username, $password); ?>
  2. My database class is static, and looks like the following. As per your remark, Thorpe
  3. I don't understand what you mean by this. The while loop is there to populate the session vars, or should I be doing it a different way? I've changed the call as per your suggestion, but still having the same issues. :s As a side note: I have not overlooked string cleanup - I just have not yet implemented it. It's on the to-do list though!
  4. Basically, I'm still trying to wrap my head around OOP. What I'm trying to do here is a simple OOP user login script. But when I submit the form, all that happens is that the text fields reset them selves and nothing that I feel should be happening, happens. ie: I submit login data, and either it displays an error or reirects to index page. Neither happen, the form merely resets. Where am I going wrong? <form name="loginform" id="loginform" action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> <p> <label>Username<br> <input name="user" id="user_login" class="input" size="20" tabindex="10" type="text" /> </label> </p> <p> <label>Password<br> <input name="pass" id="user_pass" class="input" value="" size="20" tabindex="20" type="password"></label> </p> <p class="forgetmenot"><label><input name="rememberme" id="rememberme" value="forever" tabindex="90" type="checkbox"> Remember Me</label></p> <p class="submit"> <input name="login" id="submit" class="button-primary" value="Log In" tabindex="100" type="submit"> <input name="redirect_to" value="/users.php" type="hidden"> </p> </form> <?php if(isset($_POST['login'])) { $username = $_POST['user']; $password = $_POST['pass']; include("./classes/class.users.php"); USERS::login($username, $password); } ?> <?php // Yes, my DATABAASE::DoIT(1) // (0) is working as intended (from a different include file) class USERS { var $user; var $pass; var $email; ////////////////////////////////////////////////////////////////////////////////////////////// function login($user, $pass) { include("/var/www/config.php"); DATABASE::DoIt('1'); $hashword = sha1($CONFIG['salt1']."$pass".$CONFIG['salt2']); $sql = "SElECT * FROM users WHERE username='$user' AND hashword='$hashword'"; $result = mysql_query($sql); $count = mysql_num_rows($result); if($count==1) { while ($row = mysql_fetch_assoc($result)) { define('USERS_AUTHENTICATED', true); $_SESSION['USERS_username'] = $row['username']; $_SESSION['USERS_userid'] = $row['userid']; DATABASE::DoIt('0'); header("Location: index.php"); } } else { $_SESSION['loginError'] = true; DATABASE::DoIt('0'); return $_SESSION['loginError']; } DATABASE::DoIt('0'); } } ?>
  5. To Sumarize: 1) You should NEVER had a cleartext pw in a database. A users password will always be stored as a hash. At login, the submitted pw is hashed, and the two hashes compared. 1a) Registration: Username -> Database, Password -> Hashed -> Database 2) Make sure you use a salt on your hashes. THIS SALT MUST NEVER CHANGE! Set it as a static variable somewhere and never, ever change it. It WILL break everything. 3) Use sha over md5, better yet, use sha2.
  6. http://pastebin.com/DbHQSYd7 Been stumbling my way through OOP and seem to be understanding it for the most part (I think..) But I've got a couple questions / kinks that I can't seem to work out. a) How do I return a variable from a class so that a different class has access to it (meta_data) b) I'm getting a "$this" cannot be redefined error (which I know why, but I don't know how to fix)) c) How do I call a function from within one class, where the function resides in another class, AND pass it variables? Any help would be greatly appreciated I've tried to Google warrior A and I think I can figure that one out, but B and C are proving to be the real stumbling blocks.
  7. Well that was much easier than I had originally expected it to be... Alright, turning this whole idea upsidedown... How do I construct a table (well, multiple technically [the fewer the better]) that will allow for the following... Let's pretend we're making a game. In this game, there are blueprints. A blueprint is a set of instructions that allows a user to produce an item by using other ingame items. Example: To Create: Raven (ship): 11k Tritanium, 9k Pyerite, 2k Mexallon Golem (ship): 1 Raven, 1000 Morphite, 4 Sensor Clusters, 5 Propulsion Units, 7 Hardpoints Sensor Cluster (item): 300 Hypersynaptic Fibers, 90 methoflourine Plates, 8 morphite, 500 tritanium Propulsion Unit (item): 470 Tritanium, 4 construction blocks, 1 Exotic dancer (lewl?) Hardpoint (item): 7 crystaline carbide, 8 tungsten plating, 90 isogen, 30 zydrine Exotic Dancer (Commodity): Bought off market We're talking setting up a huge relational database here. It's totally doable, just a pain in the ass for the situation that it's going to be used in. Essentially, there are thousands of blueprints and items in the game, but only a small handful that the user will be concerned with (only the stuff they need to use). What's the most logical method of setting up relations here, if not simply comparing known data to what's being dumped from an ordered list? Edit: I suppose I should add in a purpose here... Hopefully, the goal here would be to have a quick access to a list of the owned blueprints for an individual player. When one is selected, a bunch of data is displayed from it (total minerals required among other). If raven is Tier 1 and Golem is Tier 2, I suppose a table for Tier 1, Tier 2, Components, and Minerals could be created. and a for loop could be used to assess the returned data from a T2 ship and just build up an array. Then math could be done... Yes? The issue with that though would potentially having a for each loop within a while, and if memory serves, PHP doesn't like that...
  8. you have an open ' after your last $email = $_POST edit: have your $msg var in double quotes, as if you put $msg = 'Estimated Total:' . .. Wait, lot's of quotational mistakes... Try this.. <html> <body> <?php if(isset($_POST['submit'])) $dimen1 = $_POST['room1']; $dimen2 = $_POST['room2']; $dimen3 = $_POST['room3']; $dimen4 = $_POST['room4']; $dimen5 = $_POST['room5']; $email = $_POST['email']; $sum= $dimen1 + $dimen2 + $dimen3 + $dimen4 + $dimen5; // printf("$%01.2f", $sum); echo "Your estimate is: $ $sum"; $to = 'myemail@aol.com'; $subject = 'You have an estimate request'; // Look at your quotes... Where do open and close? // Doesnt work => $msg = 'Estimate Total': \$$sum\n" . $msg = "Estimate Total: $ $sum"; mail($to, $subject, $msg, 'From:' . $email); ?> </body> </html>
  9. I know this is possable, but I'm not quite sure where to begin looking / coding What I need to achieve is this: I have a field in my database, that contains a list, chunked out in groups, using square brackets. The order is: [item][Quantity][item2][Quantity2] ... [Trees][300][boxes][4000][Gizmos][3] ==> Yeilds: 300 Trees, 4000 Boxes, 3 Gizmos When I retrieve that list, I need to iterate through each element, adding the item into an array, and it's corresponding quantity into another array (each chunk at the same index). Where should I start? PS: I know this isn't all that practical, I'm trying to use this as a learning exercise is all.
  10. function writeCmd() { // var div = top.buttonFrame.document.getElementById("buttonList"); for(i=0;i<arrCtr;i++) { top.buttonFrame.document.getElementById('buttonList').innerHTML = '<input type="Button" value="' + buttonTXT[i] + '" id="' + buttonIDS[i] + '" name="' + buttonIDS[i] + '" class="submenu_special" onclick="top.contentFrame.document.forms[0].submit()" /><br />'; } } So I have a basic function here, and it works... except for one thing... My arrays have multiple elements, and innerHTML only lets one button get written (the last)... How can I append, vs. replacing with this function?
  11. I have a function, but I can't seem to figure out how to be able to get a function from one frame write to another frame... my DOM's all wrong apparently... What I'm trying is this... top.buttonFrame.document.write(htmlClose) My page is set up as such. I have two iframes in the page, one called buttonFrame and the other called contentFrame. What I'm trying to have happen is get contentFrame to run some JS to write into buttonFrame What am I doing wrong?
  12. I am in the process of writing a script that will take two values, add them to an array (the array can be of any size). Then, a second function will take the values from the arrays and generate buttons based on a counter. The mainContent iFrame will be where the population occurs, once all values have been submitted, a second function is run that will document.write into the menuFrame FROM the mainContent frame. So far... // Set cmdKey counter (so we know which order we load our values in...) var cmdCtr = 0; // Define our array that will hold the various keycodes for the buttons var cmdKeyCode = new array; // Define our array that will hold the keytexts var cmdKeyText = new array; // To grab button ID's and Values on the fly from the JIT... function addCmd(Text, keyCode) { cmdKeyCode[cmdCtr] = keyCode; cmdKeyText[cmdCtr] = Text; cmdCtr++; } // Function for creating an html string from arrays, // refresh button frame and then write buttons to frame. // THIS FUNCTION IS EXECUTED FROM THE CONTENT FRAME - writes to buttonFrame function writeCmd() { for(i; i < cmdCtr; i++) { var value = cmdKeyText[i]; var code = cmdKeyCode[i]; parent.buttonFrame.document.writeln("<input name='".code."' type='button' value='".value."' id='".code."' class='submenu_special' />"); } } I have a couple questions about my code here. a) Is this code going to do what I'm looking to do, and if not, why? b) in php, you can add variables to a string being outputted by either using double quotes and just including the $var or by terminating the quotes, adding a period, then the var and continuing. What's the equivilent to adding variables in JS to a document.writeln() c) Are my frame references correct to writing the data into the second frame?
  13. Shoot, didn't know you could only join one additional table. Guess it's back to the drawing board to write a few more queries
  14. Alright, tried again. Put $result into the IF, and my else { mysql_error(); } Updated my query, using AND's, added in missing semi colon. Still getting the same error: mysql_fetch_assoc() is not a valid res Updated Code... <?php error_reporting(E_ALL); ini_set('display_errors','On'); @define('IN_SPAAZZ', true); include('config.php'); database(1); // This is our system ID $sid = $_GET['id']; // And here it is... one giant ass sql join... $sql = " SELECT staStations.officeRentalCost, staStations.stationName, staStations.reprocessingEfficiency, staStations.reprocessingStationsTake, eveNames.itemName, staServices.serviceName FROM staStations FULL JOIN eveNames, staOperationServices, staServices ON staStations.solarSystemID = '$sid' AND eveNames.itemID = '$sid' AND staOperationServices.operationID = staStations.operationID AND staServices.serviceID = staOperationServices.serviceID ORDER BY staStations.stationName "; if($result = mysql_query($sql)) {} else { mysql_error(); } // Array for all formatted data... $master = array(); while ($row = mysql_fetch_assoc($result)) { $staName = $row['stationName']; $staRentalCost = $row['officeRentalCost']; $staRepoEffic = $row['reprocessingEfficiency']; $staRepoTake = $row['reprocessingStationsTake']; $eveSystemName = $row['itemName']; $staServiceNames = array($row['serviceName']); foreach($row as $key) { array_push($master, $staName, $staRentalCost, $staRepoEffic, $staRepoTake, $eveSystemName, $staServiceNames); } } print_r($master); database(0); ?>
  15. I have an iFrame setup that looks like... <iframe name="contentFrame" width="720px" src="http://10.209.91.30:4110/web2e" frameborder="0" scrolling="auto" marginwidth="0" marginheight="0" height="400px" class="frameclass"></iframe> In this iFrame, I have a javascript variable that is set and reset every time the page is loaded/reloaded... <script type="text/javascript"> var FormNameVariable="10008001"; </script> In my parent frame, I need to either reference directly, or re-create the variable to be equal to what ever that var is set to in the iFrame. I am trying... var GetFormName = window.contentFrame.FormNameVariable; I also have a function to spit out what ever that variable is.. function writeformname() { document.write(GetFormName); } In the parent frame (which, by the way isn't a frame - the iFrame is nested within a single HTML file) when I call that function, I get 'Undefined'. What purpose of doing this, setting the variable and referencing it, is so that I can click a button from the parent window, and have it submit (click a button) within the iFrame. I am using the following code for this... <input name="_KEN" type="submit" value="Enter" id="_KEN" class="submenu_special" onclick="javascript:parent.contentFrame.document.GetFormName._KEN.click()" /> Where am I going wrong? Note: The buttons in the iFrame are named, in this case, the above button code should be "Clicking" the button with the name of _KEN (yes, this button does exist) Lastly, on occasion, the form name in the iFrame changes - each time the iFrame is refreshed, the variable I am setting is also refreshed. So, is there a way to continually keep the variable in the parent window updated?
  16. This is my first attempt at a sql join, referencing multiple tables for varing bits of data. $sid = $_GET['id']; I am trying to: * Get rental cost, station name, repo efficiency, repo station take FROM staStations WHERE solarSystemID='$sid' * Get itemName FROM eveNames WHERE itemID='$sid' * Reference rows: staOperationServices.operationID = staStations.operationID * Get multiple rows of: serviceName FROM staServices WHERE serviceID = staServiceOperations.serviceID I will include table structure below. staStations CREATE TABLE IF NOT EXISTS `staStations` ( `stationID` int(11) NOT NULL, `security` smallint(6) default NULL, `dockingCostPerVolume` double default NULL, `maxShipVolumeDockable` double default NULL, `officeRentalCost` int(11) default NULL, `operationID` tinyint(3) unsigned default NULL, `stationTypeID` smallint(6) default NULL, `corporationID` int(11) default NULL, `solarSystemID` int(11) default NULL, `constellationID` int(11) default NULL, `regionID` int(11) default NULL, `stationName` text, `x` double default NULL, `y` double default NULL, `z` double default NULL, `reprocessingEfficiency` double default NULL, `reprocessingStationsTake` double default NULL, `reprocessingHangarFlag` tinyint(3) unsigned default NULL, PRIMARY KEY (`stationID`), KEY `constellationID` (`constellationID`), KEY `corporationID` (`corporationID`), KEY `operationID` (`operationID`), KEY `regionID` (`regionID`), KEY `solarSystemID` (`solarSystemID`), KEY `stationTypeID` (`stationTypeID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; staOperationServices CREATE TABLE IF NOT EXISTS `staOperationServices` ( `operationID` tinyint(3) unsigned NOT NULL, `serviceID` int(11) NOT NULL, PRIMARY KEY (`operationID`,`serviceID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; staServices CREATE TABLE IF NOT EXISTS `staServices` ( `serviceID` int(11) NOT NULL, `serviceName` text, `description` text, PRIMARY KEY (`serviceID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; eveNames CREATE TABLE IF NOT EXISTS `eveNames` ( `itemID` int(11) NOT NULL, `itemName` text, `categoryID` tinyint(3) unsigned default NULL, `groupID` smallint(6) default NULL, `typeID` smallint(6) default NULL, PRIMARY KEY (`itemID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Currently, I get the following output from my page... Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /xxxx/xxxxxxx/xxxxxxxxxx/tools.php/sinfo.php on line 44 Array ( ) Line 44 is... while ($row = mysql_fetch_assoc($result)) { Below is the entire page, with SQL Join included... error_reporting(E_ALL); ini_set('display_errors','On'); @define('IN_SPAAZZ', true); include('config.php'); database(1); // This is our system ID $sid = $_GET['id']; // And here it is... one giant ass sql join... $sql = " SELECT staStations.officeRentalCost, staStations.stationName, staStations.reprocessingEfficiency, staStations.reprocessingStationsTake, eveNames.itemName staServices.serviceName FROM staStations FULL JOIN eveNames, staOperationServices, staServices ON staStations.solarSystemID = '$sid', eveNames.itemID = '$sid', staOperationServices.operationID = staStations.operationID, staServices.serviceID = staOperationServices.serviceID ORDER BY staStations.stationName "; $result = mysql_query($sql); // Array for all formatted data... $master = array(); while ($row = mysql_fetch_assoc($result)) { $staName = $row['staStations.stationName']; $staRentalCost = $row['staStations.officeRentalCost']; $staRepoEffic = $row['staStations.reprocessingEfficiency']; $staRepoTake = $row['staStations.reprocessingStationsTake']; $eveSystemName = $row['eveNames.itemName']; $staServiceNames = array($row['staServices.serviceName']); foreach($row as $key) { array_push($master, $staName, $staRentalCost, $staRepoEffic, $staRepoTake, $eveSystemName, $staServiceNames); } } print_r($master); database(0); Where am I going wrong with my join or is it something stupid in the actual PHP that I'm missing? For referencing this many tables at once, should I be using a different method of retrieving data, say from one table at a time? (note: I tried that, and it's a pain...) Thanks!
  17. I'm guessing that I have my method wrong here somewhere along the lines... Anyone willing to point me in the right direction as to where I'm going wrong with my arrays? <?php @define('IN_SPAAZZ', true); include('config.php'); database(1); // Make sure we arent trying to execute anything without being called properly... if(!isset($_GET['id'])) { die("This page must not be accessed directly..."); } // This ID is the ID for the given solar system..... $systemid = $_GET['id']; // SQL for pulling station information // stationTypeID used in reference to staOpperations // to get services at station // Variable for stationTypeID - $stTypeID // $stTypeID then references staStationTypes $get_stations = "SELECT officeRentalCost, operationID, stationTypeID, corporationID, stationName, reprocessingEfficiency, reprocessingStationsTake FROM staStations WHERE solarSystemID = '$systemid' ORDER BY stationName"; // SQL for pulling solar system info... ehehehee $get_sysinfo = "SELECT itemID, itemName FROM eveNames WHERE itemID = '$systemid'"; // Set queried variables... $stations = mysql_query($get_stations); $system = mysql_query($get_sysinfo); //Master Array $sysInfo = array(); // Declair the variable to hold each array, containing all datumz... // Child Array - Holds station info - NOT SERVICES $info = array(); //Child Array - Holds operationservice ID's... $svcIDs = array(); // Child array - holds station services $staSvcs = array(); while ($rowsta = mysql_fetch_assoc($stations)) { $rentalCost = $rowsta['officeRentalCost']." ISK per 30 Days<br />"; $staTypeID = $rowsta['stationTypeID']."<br />"; $corpID = $rowsta['corporationID']."<br />"; $staName = $rowsta['stationName']."<br />"; $repoEffic = $rowsta['reprocessingEfficiency'] * 100 ."%<br />"; $repoStaTake = $rowsta['reprocessingStationsTake'] * 100 ."%<br /><br />"; // Need Op ID to reference staOpperationServices (opID -> ServiceID) then from staServices (ServiceID -> ServiceName) $opperationID = $rowsta['opperationID']; // Push data into the array $info in the following order... array_push($info, array("$staName", "$corpID", "$staTypeID", "$rentalCost" , "$repoEffic", "$repoStaTake", "$opperationID")); } //array_push($sysInfo, $info); foreach($info as $key) { // SQL for grabbing service ID's based on $key $keyql = "SELECT serviceID FROM staOperationServices WHERE operationID = '$key'"; $keyqlres = mysql_query($keyql); while($rowz = mysql_fetch_assoc($keyqlres)) { $staSvcIds = $rowz['serviceID']; array_push($svcIDs, "$staSvcIds"); } } foreach($svcIDs as $key) { $svcSql = "SELECT serviceName FROM staServices WHERE serviceID = '$key'"; $svcNameRes = mysql_query($svcSql); while($svRow = mysql_fetch_assoc($svcNameRes)) { $svcs = $svRow['serviceName']; array_push($staSvcs, array("$svcs")); } //array_push($sysInfo, $staSvcs); } // Push two child arrays (Services and Sta Info) into master array... Ignore ID array... //array_push($sysInfo, $info); print_r($info); //print_r($staSvcs); database(0); ?> Edit: Right. I don't get errors here, just... when I print_r on any of my arrays, they're all empty.
  18. der, thanks But my arrays are afu'd... I should be getting a bunch more data dumping out than what I actually am getting. eg: [6] => ) [1] => Array ( [0] => Jita IV - Moon 10 - Caldari Business Tribunal Law School [1] => 1000033 [2] => 3871 [3] => 10000 ISK per 30 Days [4] => 50% [5] => 5% I should also be getting a bunch of services as well...
  19. <?php @define('IN_SPAAZZ', true); include('config.php'); database(1); // Make sure we arent trying to execute anything without being called properly... if(!isset($_GET['id'])) { die("This page must not be accessed directly..."); } // This ID is the ID for the given solar system..... $systemid = $_GET['id']; // SQL for pulling station information // stationTypeID used in reference to staOpperations // to get services at station // Variable for stationTypeID - $stTypeID // $stTypeID then references staStationTypes $get_stations = "SELECT officeRentalCost, stationTypeID, corporationID, stationName, reprocessingEfficiency, reprocessingStationsTake, opperationID FROM staStations WHERE solarSystemID = '$systemid' ORDER BY stationName"; // SQL for pulling solar system info... ehehehee $get_sysinfo = "SELECT itemID, itemName FROM eveNames WHERE itemID = '$systemid'"; // Set queried variables... $stations = mysql_query($get_stations); $system = mysql_query($get_sysinfo); //Master Array $sysInfo = array(); // Declair the variable to hold each array, containing all datumz... // Child Array - Holds station info - NOT SERVICES $info = array(); //Child Array - Holds operationservice ID's... $svcIDs = array(); // Child array - holds station services $staSvcs = array(); while ($rowsta = mysql_fetch_assoc($stations)) { $rentalCost = $rowsta['officeRentalCost']." ISK per 30 Days<br />"; $staTypeID = $rowsta['stationTypeID']."<br />"; $corpID = $rowsta['corporationID']."<br />"; $staName = $rowsta['stationName']."<br />"; $repoEffic = $rowsta['reprocessingEfficiency'] * 100 ."%<br />"; $repoStaTake = $rowsta['reprocessingStationsTake'] * 100 ."%<br /><br />"; // Need Op ID to reference staOpperationServices (opID -> ServiceID) then from staServices (ServiceID -> ServiceName) $opperationID = $rowsta['opperationID']; // Push data into the array $info in the following order... array_push($info, array("$staName", "$corpID", "$staTypeID", "$rentalCost" , "$repoEffic", "$repoStaTake", "$opperationID")); } foreach($info[6] as $key) { // SQL for grabbing service ID's based on $key $keyql = "SELECT serviceID FROM staOpperationServices WHERE opperationID = '$key'"; $keyqlres = mysql_query($keyql); while($rowz = mysql_fetch_assoc($keyqlres)) { $staSvcIds = $rowz['serviceID']; array_push(svcIDs, "$staSvcIds"); } } foreach($svcIDs[0] as $key) { $svcSql = "SELECT serviceName FROM staServices WHERE serviceID = '$key'"; $svcNameRes = mysql_query($svcSql); while($svRow = mysql_fetch_assoc($svcNameRes)) { $svcs = $svRow['serviceName']; array_push(staSvcs, array("$svcs")); } } // Push two child arrays (Services and Sta Info) into master array... Ignore ID array... array_push($sysInfo, $info, $staSvcs); print_r($sysInfo); database(0); ?> I am getting the following error: Fatal error: Only variables can be passed by reference in /home/geudrik/spaazz.net/tools.php/systeminfo.php on line 77 Line 77 is the following: <?php array_push(svcIDs, "$staSvcIds") ?> I know that it has something to do with the method that I'm trying to set my arrays up for, but I can't seem to find where I'm going wrong. Anyone have any suggestions?
  20. And to finish off my PHP function for taking data and rearranging it... <?php function myfunction($id, $name) { $ids = array(); $names = array(); foreach ( $id as $name ) { array_push($ids, $id); array_push($names, $name); } $data = ''; foreach ($ids as $value) { $data .= "<input type='submit' name='".$ids['$value']."' id='".$ids['$value']."' value='".$names['$value']."'>"; return $data; } } ?> This php function shows that I'm trying to do in JS... I need to do this in JS.
  21. Names... Array ( [0] => Enter [1] => Exit [2] => Help ) ID's... Array ( [0] => _KEN [1] => _K03 [2] => _KHL ) This should demonstrate exactly what I'm trying to do... These arrays only have 3 values in them, but ultimately there will be an unknown number of matched pairs. For example, the text that goes with _KEN is 'Enter'. Now, if the arrays look like this, how do I write a function in JS to take the output (one at a time) of echoed ID's and Names? And yes, adding to arrays and objects is simple (when you're doing it manually, one item at a time). But adding to arrays and objects dynamically is more difficult, and the reason I'm here
  22. Nightslyr, thats an awesome response, but how do I add to the array for each chunk? Eg: There will be a variable, called ID and NAME and each one will be spitting out an array. Eg: Array{ [_KEN, Enter], [_K03, Exit], [_KHL, Help] ... } <-- what the array should look like after the page loads... The function you give works yes, but how do I add to the array, populating it like so? Also, all of the ID's are in the form of: _K## Ultimately, I will be creating a function that takes this populated array and writes buttons (Name = Text on Button, ID = button.name and button.id) in a different frame.
  23. It would actually be awesome if I could push both pieces of data into one array, that way I can pull both parts from the same array. I feel like I'm making this overly complicated. I need to add two individual strings into an array to be manipulated later in a different frame. Unfortunately my environment does not support PHP, otherwise this would be a snap...
×
×
  • 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.