Jump to content

thedarkwinter

Members
  • Posts

    191
  • Joined

  • Last visited

Everything posted by thedarkwinter

  1. hi php itself will handle most of the file sytems differences, but there are some things you need to do, such as: 1. windows uses \ and linux uses / 2. windows uses drive letters, linux does not. Usually its better to use relatives paths. example: opening a file //Win: note the backslashes $file = fopen("c:\\temp\\myfile.txt", "r"); //Lin: $file = fopen("/tmp/myfile.txt", "r"); while my windows knowledge is pretty basic, feel free to ask more if i have missed something in your question. cheers, tdw
  2. you can use implode to convert the array to string (csv?) $output = implode(",", $myarray); hope that helps cheers, tdw
  3. I don't have the patience either, but near the top i see the line if ($playerinfo[chatban] > 0){ That got anything to do with it? Otherwise, look for other >0's
  4. Okay, so i reckon i've fixed all (or hopefully most) of that, you want to have another crack at it? cheers, tdw
  5. Thanks agentsteal A bit later i will try to figure out what all this means - but i can see that my site isn't very secure
  6. every row should have a specific index/id - right? so the query would be DELETE FROM mytable WHERE rowid=2; cheers, rdw
  7. ... and, sorry, i keep posting on my own post, i don't have I.E. does the js etc i've used work in IE, or is it messing it up?
  8. ... sorry, you dont need to set up an account username: testuser password: testpass
  9. He guys Can you check out my site i'm working on at http://www.best-nights-out.com. I'm looking for any constructive criticism on design etc... but also security. Account security isn't really important cos i dont keep any personal details, but things like SQL injection.. (im backing up the DB now, so hack away ) cheers, tdw
  10. If you are deleting everything in the table then "DELETE FROM mytable" will delete everything... And then do your insert
  11. date("l nS \of F Y") n = month number use d instead
  12. k i think ive got it this time you need to put else's before the second and third if because its defaulting to the last "else" if this doesn't work then maybe i stop giving stupid suggestions <?php /... if ($site1 <> 'All' && $tech1 == 'All') { $query ="SELECT * FROM helpdesk h WHERE h.site = '$site1'"; } else if ($site1 == 'All' && $tech1 <> 'All') { $query ="SELECT * FROM helpdesk h WHERE h.tech = '$tech1'"; } else if ($site1 == 'All' && $tech1 == 'All') { $query ="SELECT * FROM helpdesk h"; } else { $query ="SELECT * FROM helpdesk h WHERE h.tech = '$tech1' AND h.site = '$site1'"; }
  13. Ok so maybe in the file that creates the XML, instead of echo'ing or print'ing, use a variable, say $xml so <?php $xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"; $xml .= "cdcsdcs"; // etc.. and then in your other php file, after you have included this file, just use the variable $xml. <?php //... include("xmlgenerator.php"); // your variable is now set xml_parse($xml) // or whatever echo $xml; im i following you now? hope so tdw
  14. ... also i think <> should be replaces with !=
  15. the str_replace function should work, replacing all occurences of the first param with the second using regex, can become more complicated (preg_replace). $input = str_replace("www.old.com", "www.new.com", $input); cheers, tdw
  16. Sorry, maybe its just me, but im a bit confused about what you are trying to do: Are you trying to parse the xml, or output it to the screen? What should you be getting?
  17. i cant remember off hand how php deals with and's and or's and whether you need brackets or not, but try doing this <?php //... if ( ($site1 == 'All') and ($tech1 <> 'All') ) ... etc for all of those statements
  18. I personally recommend Kubuntu, buts just personal preference... you're good to go either way. As far as Vista goes for security, i've got agree about AVG/Spybot, but are you going to dual boot? If so, make sure you install windows first, otherwise it overwrites the boot partition and makes getting back into Linux a rather long process. If you are deciding to go one way or the other, then i would advise going for Linux except if you are a big gaming fan... (although i have WoW etc running in linux) As for updates, in (k)ubuntu - theres a config file call /etc/apt/sources.list When the next version is released, you just edit that file and string replace "feisty" with "gutsy", and then apt-get dist-upgrade ... its as simple as that.
  19. try: $day = intval($day); should do the trick. cheers, tdw
  20. Well, can you split them into groups? When you say professions i assume you mean, IT, LAW etc... So can you have drop-down 1 with a class of professions, and drop down 2 with the sub-classes... if that makes sense... alternatively, you can use a listbox rather than a dropdown stating size in the select: <select size='10'> cheers, tdw
  21. hehe ??? $_GET is the url parameters, not a database: so when your link goes to http://www.blah.com/page.php?name=myname $_GET["name"] would = myname in your case <?php //..... code code code echo "<input name=\"name\" maxlength=\"500\" style=\"width:150px; float:left\" size=\"500\" value='{$_GET["name"]}' /> ... should do the trick
  22. Hi try removing the ' ' around $DecimalRemovalStrength... so $DecimalRemovalStrength = 2.4244; $addstrength = "UPDATE userregistration SET Strength=Strength+$DecimalRemovalStrength WHERE UserID='{$_SESSION['Current_User']}'"; $resultresult = mysql_query($addstrength) or die(mysql_error()); If (mysql_affected_rows() == 0) { die('Error ID 0001, contact admin on the Civilian forums immediatly about this error!'); } cheers, tdw
  23. Yes, or can generate a random new password and send that to them... cheers, tdw
×
×
  • 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.